I’ll keep this short. 

I developed a self mutilation problem in my late teens due to trauma. Eventually I started taking my lack of female attention out on myself by brutally harming myself when seeing their butt or boobs. Self loathing is probably the sub diagnosis. Now that I’ve grown as a man, have a healthy relationship, and developed my mental strength ten fold, I’m still getting plagued with intense thoughts of wanting to end my life and intense thoughts of self mutilation when I see a girls skin or an otherwise attractive woman. 

It’s because women being revealing and scandalous happens randomly in public or online and it’s hard to avoid. What coping skills can I practice to avoid these emotions?