I have intrusive thoughts about death, moments where I stop what I'm doing and relive horrible memories or imagine the people I love die suddenly and plan what I would do as if I'm living that scenario. It ruins my day and my mood but I feel like I need to do it to prepare myself for the worst. That if I don't do it, something even more terrible will happen and I'm unprepared.
Recently, I've decided to try something a bit weird. I bought a training clicker and I'm trying to train myself to do good behaviors. This is my logic:
1) I feel the need to daydream or remember horrible things
2) I do and I feel terribly sad and hopeless
3) I feel like it was worth it because I'm now more prepared
4) Repeat step 1
So this made me realise that step 3 feels like a reward. So this is my plan now:
1) Feel the need to remember or daydream horrible things
2) I don't do it and feel anxious and worried
3) Immediately do something else, anything
4) Click the clicker to mark this moment and reward myself with a treat or something positive
5) Feel glad for the treat/something positive and associate good things with not doing step 1
6) Repeat
This is basically Pavlov's positive conditioning but not perfect because I have no background in psychology and I'm basically just trying an adapted version of it I guess. I thought that it makes logical sense to me, works with dogs, so may as well give it a try for myself
Felt like sharing since your problem sounds a bit similar to mine, although I imagine having OCD is a much different hell in intensity than what I go through. I hope this helps