Answer:
The answer is obsessive-compulsive disorder (OCD).
Explanation:
Obssessive-compulsive disorder is characterised by constant unwanted thoughts (called obsessions) that can only be alleviated by performing certain repetitive actions (called compulsions). The relief is often short term.
For example, a person with the constant idea of being dirty or contaminated might engage in rigorous, repetitive cleaning of his environment and washing his hands.