John's goodness is the most important thing to him at the end of the play. He would rather die as a good, honest man than live a lie, especially after he has seen so many good, innocent people die honestly by refusing to give the courts a false confession: "... I am not worth the dust on the feet of them that hang" (Act IV). This line shows how John admires the goodness of those who have lived and died honestly, and he cannot bear to continue living knowing that these people who did the right thing in his eyes lost their lives because they refused to selfishly save their lives by lying. Elizabeth also recognizes this because Reverend Hale asks her to plead with her husband and she responds, "He have his goodness now. God forbid I take it from him!" (Act IV).
In the end, his main goal is to preserve his name, to recover some of his dignity. He has shamed his name by having an affair with Abigail. In the end, he wants to restore, to the best of his ability, his good name. He feels a great determination to pronounce that he will stand proudly with those innocent people who have been accused and would rather die than confess. He feels honored to be counted among these people who he respects. People who are better than he, like Rebecca Nurse.
He would rather die than smear his name by signing a confession. He will face death with dignity.
In Act IV, he says "Because it is my name! Because I cannot have another in my life! Because I am not worth the dust on the feet of them that hang. How may I live without my name?" (Miller)
Proctor realizes that by withdrawing his desire to confess to witchcraft he has a renewed sense of honor. He feels that by refusing to sign the confession that he has some integrity back since the affair with Abigail was made public.
Even his wife feels that she should not try to convince her husband to confess, she says he has his goodness back, and can't bear to take it from him.