How did John Proctor's guilt from his affair with Abigail help him see the pretense in the town?
I think that the best example of how Proctor's own understanding of his sin with Abigail compels him to understand the true nature of what is happening in the town comes at the end of the drama. Certainly, he has understood the nature of hypocrisy and pretenses throughout the drama. Yet, it is only in the final scene is he able to put it into full terms and specific language that makes it clear that his own shortcomings enable him to see into the life of "the other," meaning the town. Consider his closing speech, where such synthesis between his own understanding of "name" reflects the larger understanding of what is happening in Salem:
Because it is my name! Because I cannot have another in my life! Because I lie and sign myself to lies! Because I am not worth the dust on the feet of them that hang! How may I live without my name? I have given you my soul, leave me my name!
For Proctor, he recognizes clearly his own sins. He understands that he has "ruined" his name with his affair with Abigail and the attempts and concealing it which resulted. He understands that the short cuts taken in order to avoid confronting the truth and being honest with oneself about it has disastrous consequences. In this understanding, Proctor understands the condition of those in Salem who are doing the same thing. For Proctor, he understands how individuals, good individuals, have been persecuted and suffered greatly because of the lack of courage to face the truth and be honest with oneself and others about it. When Proctor speaks about "his name," he articulates a condition that makes it clear that moral courage towards truth is both a subjective reality and social necessity. It is here where Proctor's own sins and recognition of them have helped him understand the same pretenses that exist within Salem of the time period.