When a pet dies, I focus on how my wife and I provided a safe, loving environment for him or her. And all we've had here were rescues, so I imagine that our home was so much better than roaming the streets eating garbage, or confined to a cage in a shelter.
I'm reluctant to recommend a form of self harm. But if you can avoid breaking the skin, you avoid infection. There's a spot on the forearm that you can press to cause pain. It's taught as a self defense technique when a low-key intervention is called for. If you absolutely must do something, that "pressure point" would be preferable to what you do now. I do a "press" on my knuckle occasionally, so I do have that urge myself.