Really high-intensity exercise, like running or cycling, has always helped me a lot. But I can't always do that, obviously, so things like listening to upbeat music (nothing sad/angsty/triggering!), watching something funny on Netflix (like The Office/Parks and Rec), or hanging out with friends can be helpful distractions and maybe even turn my mindset around for the time being.
Those things work when I just kind of generally feel like self harming; when it feels more urgent, then...I don't know. Sheer force of will?
That's pretty much what's been getting me through the really tough spots of the last 14 months. I wish I had a more reliable go-to for when it gets really tough.