Sounds bit like some obsessive dissorder. In any case, mental healing spells or mental protection can help.
Ceartain crystals are said to shut the mind bable such as Aquamarine, Blue lace Agate, Saphire etc. Simply cleasing , charging and carrying one of those may help.
You could try with a mojo bag that is used to "conquer mind troubles" and it should contain for example :
*High John the Conqueror root or Master root ( to conquer or gain mastery over something, here Your mind )
*Mint - Gives strength and clarity, particularly in times of need
*Flax seeds - Blessing and healing the mind, strenghtening mental powers
Of course, If You'd make it Yourself, make sure You know how to properly create
use and take care of a mojo bag. You may add aditional plants, above mentioned is just off top of me head suggestion, there are more combinations that could be used, though always an odd number of ingredients, make sure!
Also You may benefit from a ritual head wash from time to time , for example:
Half a cup blessed salt
Few drops of rosemary essential oil
Sage tea in enough amount to make it a paste-ish solution
Rub on head, wrap in a white towel , hold that on Your hand for 10-20 minutes, wash off, , air dry.
It's suggested than that If You can get it add some cocconut juice or paste to "feed the head" and then wrap head in clean white clothe s and go to sleep. You can do that . One a month, maybe on night just before Moon enters waxing period
You could pray to Saint Dymphna for mental healing, and clarity of mind, If You do not mind working with a Christian Saint.
Lost of wisdom and many Blessings and many wisdom Your way, hope this helps.