Hi slumberkitty. Congratulations on the success you have had in refraining from self harming. I am sorry you are still struggling with what might be called invasive thoughts. This article talks about it.
How to Deal with Invasive Thoughts
Online support groups may be helpful - google search online support groups for self harm. Having someone that you can talk to or help reduce the pain you may be experiencing. I like a very strong cup of peppermint tea. I buy in bulk like at amazon. It helps take the edge off of my emotions.
This article may be of interest
Self-Harm: The Myths & the Facts
I use this video to help me refocus my attention.
YouTube