When people think of obsessive-compulsive disorder (OCD), they probably think of people washing their hands endlessly from fear of contamination or compulsively counting things or checking the door is locked numerous times.

While these are indeed forms of OCD, in reality, OCD covers many other forms of behaviour. What they all have in common is the involuntary and distressing nature of the obsessions and compulsions (if someone enjoys their obsession or compulsion, it is not OCD).

OCD lives in the world of doubt, in the realm of uncertainty, in those horrible words “But what if...?” Of course, nothing in life is ever completely certain. I might make a point of concentrating on locking my door, focusing on the event to remember it clearly later, but perhaps my memory is simply imagination, “remembering” what I would have liked to have happened, or what happened yesterday.

Even if I write myself a note saying I have locked the door, perhaps I made a mistake, thinking I had locked the door when I had not done so. This leads to a quest for reassurance that can never be satisfied and only fuels the OCD further.

So I go back to check the door is locked, but come to doubt that memory too and go back there and check again and again...

I think there is a sense in which OCD is an autoimmune disease of the mind. Just as the immune system is vital for an organism’s life, but with an autoimmune disease it attacks the body itself, so too OCD takes vital thought processes – our internal guards against inappropriate or reckless behaviour – and turns them against us, making us fearful of very safe behaviours.

My personal struggle with OCD took place over several years. It started quite suddenly, triggered by a major life event. It could be described in two phrases, “pure O” and “scrupulosity.” Pure O (obsession) involves obsessive thoughts without compulsive actions. These can vary widely from person to person. Some people might have disturbing violent or sexual thoughts; religious people might have unwanted blasphemous thoughts and so on. While there is no physical compulsion, the thoughts lead on to obsessive thinking, wondering what the thoughts mean. “If I had a thought of hurting someone, does that mean I really want to hurt them? Am I really a psychopath?”

An unending search for definitive “proof” that the obsessive person is not really dangerous ensues – unending because, as I said above, no definitive proof is possible. The reality is that pure O is characterized by the disturbing nature of the thoughts – the fact that the person finds them so disturbing is the proof that they are unlikely to act on them. But this is not usually strong enough proof in the midst of obsessive thinking.

Research shows that religion does not cause OCD, it merely determines the form it will take. The OCD just finds the most painful and heartfelt area to attack.

The other aspect of my OCD was scrupulosity. Scrupulosity occurs when a person worries that they may be infringing their religious or moral code. In my case this usually took the form of worrying that I had broken the Jewish dietary laws and obsessively checking with my rabbi or in books to see that what I had done was okay.

Judaism did not cause my OCD. Research shows that religion does not cause OCD, it merely determines the form it will take. If I was not worrying about religious food laws, I would probably have been worrying obsessively about food hygiene. The OCD just finds the most painful (because it’s the most heartfelt) area to attack.

Eventually, with CBT exposure therapy, I was able to make progress in challenging my compulsions, forcing myself to perform actions that my mind found more worrying than was really the case. I slowly acclimated myself to behaviour that my OCD mind found dangerous but which was just normal behaviour to most people, until the compulsive checking was no longer necessary and the obsessions began to fade away.

The negative self-perceptions that underlay the OCD receded too as I began to feel that I may not be such a bad person, that I may even be a good person. The experience of OCD was painful in the extreme, but with God’s help I came through it.

A version of this article originally appeared on The Den of Geek.