I know how difficult this is and I'm sorry for your loss.
First, know that what you're experiencing is completely normal and expected; regardless of "OCD." Pretty much anyone who loses a loved one or a pet will have intrusive thoughts about their last moments together. It was a significant event that came with a LOT of difficult emotions, so of course the memory of the toughest parts will continue to arise.
Right now you're plagued by thoughts and images of the last moments with your pet, which brings up strong emotions that you instinctively don't want to feel, leading to the compulsive need to get rid of those emotions by looking at pictures and thinking happy thoughts. These attempts to "escape" only strengthen the impact and perceived importance of those intrusive thoughts, which primes the brain to bring them up more often (the Ironic Process).
In short, you're saying "NO" to these thoughts. Or at best, you're saying, "yes, but..." As in, "yes this is sad, BUT look at these happy thoughts!," which is just another sneaky way of saying "no."
My advice is to practice "yes, and" responses. Those thoughts are painful, and that's OKAY. Acknowledge that they are painful. "YES, that was a painful event. AND we had a great life together." Both things can be true at the same time.
Turning towards the pain is hard because it will stir up those difficult emotions, but that's OKAY. Feelings and emotions don't want to hurt you; they only want to be felt and acknowledged. Allow yourself to feel the sadness. Notice how it physically feels in your body. Feel the weight in your chest, the heaviness in your face, however it comes up for you, and just note, "Yes, this is sadness. This is the sadness of loss."
Let the thoughts come, and let them go. You don't have to do anything about them. The only thing you have to do is notice when you've latched onto them. You'll know you have when you realize you've been totally pulled out of the present moment, or you're trying to conjure up happy memories in an attempt to combat those thoughts. When you notice this, don't judge yourself for it; just gently respond, "yes that's a sad thought," and bring yourself back to the present.
Over time, you will prove to yourself, first-hand, that the thoughts don't need to be feared or pushed away. You will literally rewire your brain to not be so concerned with those thoughts, and you will naturally pay less and less attention to them. Eventually the fleeting thoughts of your last moments with your cat will be just that: fleeting. They will come and go just like the tens of thousands of other thoughts we have in a single day.
I'm not saying you can never remind yourself of the good times with your cat; far from it. You just need to notice when and why you're doing that. If it's in reaction to these negative emotions, it will only keep the hamster wheel spinning.
As for the actual loss of your cat, I'll give you a reminder that has helped me when I've lost pets or loved ones of my own: Remember that your cat will *always* be a part of your life, even though he is no longer alive. He helped shape you into the person you are today. He helped you cultivate compassion, patience, empathy, and love; all qualities that are stronger in you due to the bond you had with him. By carrying those qualities forward, you carry his legacy forward.
Yes, this is painful; AND you have gained so much from your relationship.
I hope some of this is helpful.