I still email my ex of 3 years from time to time even though she wants me to leave her alone
Why would you email her if she doesn't want you to?
I cant forget her, I'm still deeply in love with her even though she treats me like shit. I'm angry at her for breaking my heart the way she did
I understand it's hard to get over a heartbreak but you should move on after a break up. If she wants you to leave her alone then there is no chance of getting back together.
Other guys will probably let me have it if I told them I'm still emailing my ex.
It would be wrong for them to assault you over this, but it's understandable that they would be upset as well. You need to stop emailing her.  She is your ex, and you should move on from the past.