I think it may be an OCD thing too.
Phil M, I want you to picture a pink elephant in your mind… now stop thinking of it.
You know the sad thing, sometimes a person with OCD tries so hard not to think of those types of thoughts, only to have them remain there or become more intrusive; tormenting the person.
Based on my personal experience, (Im NOT a doctor), if you have OCD, you are probably experiencing unwanted thoughts, and you may not be sure if you have willed them or not. And hence, you start feeling guilty about those thoughts, you may even start thinking that you enjoyed those thoughts.
Phil, do you have OCD? If not, then Im not sure what you are going through or if you have some other problem. If it helps, I just want to say that we all have these crazy thoughts sometimes, some people are able to dismiss them easier then others. However, it starts getting dangerous when you bring them upon yourself, or actually (willfully) enjoy them.
Im not sure what your spiritual position is or whether you are sinning or not. Please provide more info for the posters here, or see a good priest for advice.
I know we are not allowed to give medical advice here, but if you do have OCD, and it is bothering you or taking up a lot of your time each day, perhaps you could seek professional help. Its not as daunting as you think.

These are just suggestions, you know yourself better than any of us.
Finally, you might not have OCD as such, but may be suffering from scrupulosity (or both), which is kind of similar, but is in relation to religious matters. Some symptoms are: going to Confession excessively, constant thoughts of blasphemy, or the person has to perform a number of rituals (such as making the sign of the cross repeatedly or a certain number of times) or having to repeat prayers until they sound “just right” etc. I think you would know if you have this problem. Apparently St. Alphonsus Liguori suffered from scrupolosity/OCD.
I think I went a bit overboard with this post

, but hopefully you do not have any of these mental problems.