The issue of over-analysing a specific scenario, or becoming scrupulous in matters of religion is not something new, and does unfortunately affect some people.
If it is not tended to in its early stages, then it can only be cured by psychological help or medical treatment.
If it is issues related to taharah/najasah, then you need to re-program yourself and corretly learn the ahkam, emphasising on the pleasure and spiritual benefit of 'ibadah, and not that it should be straining or negative.
I would recommend watching this short presentation I gave a few years ago:
You can recite this dua:
أعوذ بالله القوي، من الشيطان الغوي، وأعوذ بمحمد الرضي من شر ما قدر وقضي، وأعوذ برب الناس من شر الجنة والناس أجمعين، وسلم، تكف مؤونة إبليس والشياطين معه ولو أنهم كلهم أبالسة مثله
Also, it is recommended to eat pomegranate, as hadiths say it removes waswasah, piece by piece, and in the morning before breakfast.
With prayers for your success.