I think that this is probably one of the most difficult elements of the drama to deconstruct. The fundamental question is this: Why would Proctor, who has raised a stink to high heaven (no pun intended) about the hypocrisy of the trials and accusations, and who has withstood unspeakable imprisonment to stand by his belief of not confessing, decide to change his mind? It is not only the critical issue relating to Proctor, but is also one of the most powerful moments in the play.
Simply put, Proctor caves in at an instant of weakness. Proctor breaks down. He sees his wife, pregnant with child, and this compels him to consign himself to the decision to want to live. There might also be some residual guilt that is still there in respect to his relationship with Elizabeth. From the very first moment that the audience sees them together, it is clear that Proctor holds guilt about both the relationship with Abigail and the damage he did to his marriage. The first discussion with Elizabeth is one where he is trying to assuage his own guilt for what he did. This last moment with her could be an instant where he still feels some pangs of guilt in seeing himself as a rotten husband. For this, he asks to live and confesses to something he knows is not true.
Where things change is in the momentary and blinding realization that Proctor is a man, first and foremost, a human being. He sees the shame that Rebecca Nurse has when she finds out Proctor has "sold out." He also recognizes that even though he might want to live or he might have guilt in his heart, he is not going to be held captive because of these fears at the hands of those in the position of power. When Danforth demands that he sign, physically sign, the confession as his own, permanently linking his name to it, he recognizes what is happening. It is at this moment that fear and guilt dissipate into resistance and anger. Proctor cites many reasons for his change of mind. The lesson to his children, the fact that he could never approach the level of those, like Corey or Nurse, who have or are going to die. In this one small act of resistance, he can slowly regain back some measure of a name that has been marred and sullied. It is for this that Proctor changes his mind, recognizing that his cowardice would only add to his lack of self- worth in his marriage. This way, he is able to be an example of what should be and it is for this reason that Elizabeth and John close the play stronger than they ever could have hoped to be even though he will die.