I'm not a dr, but is that OCD? I ask that because it sounds like the obsessive part of OCD (and not everyone w/ OCD has compulsions or rituals). Part of OCD is a lot like "if I don't do this and don't do this in a specific way, then something bad will happen."
Well, whether it's OCD or not, it sounds like you could benefit from some OCD therapy techniques. Try:
My Anxiety Plan for Obsessive Compulsive Disorder | Anxiety Canada