Many people on FR have been defending him, saying he was just doing his job. But his job was to provide information and rational analysis to the UK government, and to act as a conduit from the UK to the US government. It was not to go into Trump Derangement shrieks as a form of diplomatic communication, or to create a situation where the US government would not and could not trust him.
May should actually have removed him, but instead she has defended him and has only regretted the leak! I suspect saner minds in the UK government actually persuaded him to resign.
That would be the choice of an honorable man who made bad choices.