To preface this post, this is not advice to do anything on your own, and everything I mention should be discussed/done with a clinical therapist.
Now, it depends on the thoughts, but as mentioned above, the rationalizing attempts and internet searching sounds like the ritualizing/compulsion part of OCD, which, to my knowledge tends to make things worse, even if it feels relieving in the short term.
What I was taught, was to write down my intrusive thoughts on an index card, along with what they meant to me, according to my ocd and what would immediately make me feel better (i.e. “I thought x and that means I’m a bad person. I have to look up if others have similar thoughts to ease my anxiety”), and to then read the card 10+ times a day, without giving into the compulsion, to spike my OCD anxiety, and write down on a scale from 1-10 how bad the anxiety spike is, and from 1-10 how much I gave into ritualizing, each time on a little line, on the same card, under the writing. After some time, the numbers should start to decrease and the card can be “retired” when it almost no longer causes much, if any anxiety (like a 1-2).
Again, I’m NOT saying to experiment with this on your own, as it can be extremely, emotionally intense, but I feel like it’s worth discussing with an ERP specialist.