A few things:
First would be that an object communicated a sign that it normally wouldn’t have. Let’s say I’m walking down a trail and out of the corner of my eye I see (what I perceive as) a curvy woman. In that instance my brain runs through the thoughts of
>Oh, I think there’s a woman over there.
>That woman is curved nicely.
>I like curvy women.
>I would like to take a better look at that nicely-curved woman.
I then proceed to take a better look, only to then realize that what I ACTUALLY saw was a tree. The tree happened to be curved and covered in shade in such a way that the basic shape I saw in the corner of my eye communicated “shapely woman.” But in reality, I saw a tree.
In no way does this mean I want to have sex with a tree nor this particular tree. I do not have any interest in dating a tree, regardless of how “curvy” nor “womanly” said-tree is. The feeling I held, the arousal, was a result of the “curvy-woman” shape that I had seen in the corner of my eye. This arousal is in no way proof of some hidden-tree-sex-desire that I am repressing. The arousal is the result of liking curvy-women, which was triggered by the “curvy-woman” shape of the tree; NOT the tree itself.
To get back to your original thought, the feeling was a result of the woman you believed to have originally seen, which was then repulsed by the second-look which dissolved the original image. However, arousal doesn’t change as fast as a mental picture can, so the feeling still lingered after the realization, but that isn’t therefore proof of pedophilia. A woman can look at her shirtless husband and become flustered and look back at her baby still flustered, but that doesn’t mean that the baby is now the object that is resulting in the woman’s flustering, etc. etc.
The second thing is that OCD cements itself through negative reinforcement. The incident triggered the fear of pedophilia, which then led to the compulsive obsession and (I imagine) the double-triple-quadruple-etc. checking to make sure that you’re not a pedophile. The somewhat difficult part of approaching OCD is that you cannot engage with the though positively NOR negatively.
If the obsession is “I am a pedophile,” the response is, “Maybe I am, maybe I am not. What do I want to do?” In this instance, what you want to do is continue driving, and so you drive. I’ve found not even going that detailed with the response is more helpful.
So just, “Maybe.” Not giving the thought anything to work with.
The other part is making sure that you reframe the obsession to the actual truth. So thinking to yourself
“I am having the thought that (obsession).”
rather than “(Obsession).”
So, “I am having the thought that I am a pedophile/I found a minor attractive.” And you can respond to it with humor if that helps, like
“That is certainly one of the thoughts of all time.”
“That’s definitely a string of words.”
“That’s certainly an idea.”
“Perchance.”
And so on. I personally find it funny to think of Joe Rogan saying “It’s entirely possible” to one of my obsessions, but that’s just me.
Third, once you have the response, the main thing is to not engage with the obsession in any way, meaning compulsions such as self-berating, self-flagellation, excessive prayer, and so on. You sit with the obsession/thought and let the entirety subside, which it inevitably will. It’ll take a while the first time and then slowly but surely become shorter and shorter until it becomes short to the point of being funny. I’ve had (after months of work) times where I couldn’t even finish the thought, as in
“I am having the th-“ “Maybe.”
Lastly, while I don’t want to reinforce the obsession, I do think it is important to mention that, in regard to the subject, pedophilia is despised not because of the thoughts but because of the actions. OCD is a problem of thoughts. No one is angry with a pedophile because of their inner thoughts. They’re angry because they actively bring harm to children. Rockstars in the 70s went out of their way to sleep with Highschool/middle school girls because they liked the power dynamic. You thought you saw a woman and looked away once you realized she was a minor. Don’t be so hard on yourself, if anything for the fact that it won’t help. Cut yourself some slack, address the problem and bear the anxiety, and you’ll be handling this in no time. You’re already on the right track: keep it up 👍