In a letter like this one, it will be natural to focus on Proctor's reasons for accepting the hanging instead of betraying his friends and fellow citizens and instead of betraying himself.
Integrity is the key concept here. John Proctor worries that he sacrificed his integrity permanently when he cheated on his wife with Abigail. This moral failing leads him to a great yet problematic humility.
In the end, he has to weigh the question of whether or not he can maintain any pride. If the answer is yes, some opportunity for pride and integrity remains, then he can accept hanging and die with some semblance of honor (which he does).
If the answer is no, and there is no chance to reclaim any pride as a person, a husband, or a man, then he cannot accept death. In this case, he would be living without integrity and pride and this would be his legacy. He would only have this lack to offer his children even as he was alive to raise them.
He chooses to die, bequeathing a legacy of some value to his children instead of living so as to provide them with only shame.