Hi there,
There is always a need to take the detailed history and mental status examination for coming to a conclusion. But still based on some of the history you mentioned, it appears to be OCD related disorder. But generally the thoughts and images come before the action.And there is anxiety generated with the thoughts and gets relieved by the actions.
Next Steps
So detailed history and examination is needed.
Get the advice from a mental health professional.