John Proctor wanted to be a Puritan at heart. Many people who participate in organized religions find it easy to partake in the rituals of a given faith, but to act according to the demands of the soul is a much more difficult, but honest pursuit.
Proctor was a sinner, he confessed his great sin and discussed it at length with those who were influenced by his sin. But the impact of his sin most affected him. When he turned to Abilgail in a lecherous relationship, he stained his marriage bed from that point forward. Unfortunately, Puritans failed to focus as much on the grace, forgiveness, and mercy that are offered in the Bible that they preached as on the sin that they committed. His personal conflict felt like it had no resolution, there was no method for reparation without forgiveness.
The authorities were similarly unmoved.
When John finally accepts his fateful punishment for a crime he didn't commit, I think he feels justice was served for the previous sin of lechery he did commit.