Just make sure you get it in writing that he agrees to you moving away with the boys.
It does sound like trying to hold onto the house may not be the wisest move for you, and being far away from your ex may be healthy. I also like that you will have your best friend nearby - good friends are the greatest!!!
As for dealing with his emails right now - think mental Aikido. Aikido depends on using the force of the attacker to throw him. Instead of REacting to his attacks, use your wiles to throw him.
And use language like "I know you only want what is best for me and the boys", "I know you want us to be financially stable", "I know you want us to be able to live in a safe neighborhood" etc.