Sister, what you have described is called OCD and as the sister above said you need to consult some medical doctor for proper treatment.
As for Islamic advice, I would suggest you to recite sunnah duas and seek refuge in Allah from the accursed Satan and do not let him play with your mind.
Shaykh Saleem Dhorat says:
Thoughts/ Wasaawis are like Guests. If one made a guest feel welcome, the guest is inclined to visit again and the more welcome he is made to feel the more he will be inclined to visit. However when a guest is made to feel unwelcome he may visit once or twice and then at the continuous cool reception no self respecting person will visit again.
Similarly unwanted thoughts/Wasaawis will continue to come if attention is paid to them. If ignored they may persist for a while but eventually they will cease Insha Allah.
Also please follow the advices given in the link below. InshaAllah it will help.