John Proctor's big dilemma is that he knows he can disprove all of Abigail's accusations as well as that of her friends. He is as the saying goes, "Damned if he does damned if he doesn't." He knows Abigail is doing this out of her jealousy of Elizabeth in order to try gaining John Proctor's love. He can put a stop to this and save his wife but at a high price. Proctor must decide about his personal rights or about doing what is good for the public. Since he had the affair with Abigail he knows that all this is all a show being put on by Abigail. He has tried to rid himself if Abigail but Abigail being as stubborn as she is wouldn't give him up without a fight.
She thought that without Elizabeth being around, she would move into her position as Proctor's wife. If Proctor decided to deface Abigail's plan he would need to back it up with reasons that showed Abigail was lying. He had to tell the court that he had committed adultery with Abigail. He would then lose his good name and lurk in shame for the rest of his life. He would also be penalized for his actions. However, this would save his wife, who is pregnant, and countless other from losing their good names or even their lives.
However this backfires when he confesses and Elizabeth lies to protect his good name claiming that he did not commit any adultery. He loses his wife, who is jailed after admitting to having had practiced witchcraft for fear of being hung. When John is accused of witchcraft he does not want to lose his good name and is stubborn, so he ends up being hung, but his good name was never spoiled not even by Elizabeth. John Proctor was placed in some dilemma. He had to choose between his good name and saving his wife's good name and possibly her life. Revealing the truth would be devastating to his reputation.
When he is executed for not confessing to witchcraft he achieves as Elizabeth calls "his goodness." He achieves this because he died without his good name being ruined.