John Proctor is forced to overcome a number of internal challenges in The Crucible.
First he struggles to be contrite with his wife and to be patient with her as she works her way toward forgiving him for the affair he had with Abigail. This conflict causes Proctor to soften his demeanor toward Elizabeth for a time. Unable to endure the judgements of his wife, however, Proctor grows into a new moral position wherein he stands as both apologetic and firm. He will no longer be bullied for his mistake.
This position is a middle ground on the way to self-forgiveness for Proctor. Only at the play's conclusion does Proctor finally accept the notion that he is a good person, worthy of respect and honor despite his mistake with Abigail.
The event that pushes him to this final realization is his moment of false confession. Proctor feels that he is not worthy to die a martyr's death; not pure or good enough:
Because I lie and sign myself to lies! Because I am not worth the dust on the feet of them that hang!
In the end, Proctor finds that he also is not low enough to sign a false document. Supported by Elizabeth in the idea that he is a "good man", he cannot condemn himself to a life of dishonor and cannot condemn his fellow prisoners to public guilt.
Along the way, Proctor also overcomes his shame and his pride to admit that he had committed adultery with Abigail in front of the public court. In doing so, he takes a big step toward reclaiming his moral integrity, sacrificing himself to save his wife and humbling himself before the community.