You've done the smart thing by posting here as I’m sure many readers will be familiar with your situation.
You have described one of the most common manifestations of Obsessive Compulsive Disorder. It’s a text book classic. Have you seen a health professional and if the answer is “yes”, have you been diagnosed with anxiety?
It is very important that you seek treatment as early as possible, if you haven’t already. There are effective treatments for OCD and the sooner you are in the hands of an expert the better your outcome.