OCD can have such profound effects on all aspects of one’s life and can be very debilitating. The good news is that you recognize that it is a problem for you and have sought help from your doctor. Even though the tablets you were prescribed don’t seem to be working for you, the very fact that you are actively seeking help with this problem is a good sign that you are trying all you can to overcome this difficulty.
From an Islamic perspective, OCD is generally viewed as a problem of Shaytaan’s whispers. In this case, the cure prescribed is to seek refuge from Shaytaan and remain as close to Allah (swt) as possible in all that you do in order to ward of the whispers. To do this, you need to try keeping Allah (swt) in mind as much as possible, mention His name before everything you do, and remain steadfast in worshipping. This way, Allah (swt) will always be in your mind which will keep Shaytaan at bay, in sha’ Allah. Try to increase your acts of worship at this time; pray more voluntary prayers, read the Qur’an more and make dhikr regularly. Even playing and listening to the Qur’an can help, too. It maybe that you need to do this gradually, but the more you remember Allah (swt), the less impact Shaytaan can have on you.
Additionally, look back to times when you felt something is impure, and ask yourself: what were the consequences? Did anything bad come out of something being impure, or simply, a bit dirty? Your sister-in-law’s baby with the sick on the T-shirt might have been unpleasant, but did anything bad come of it? Did anybody get hurt? And what’s the worst that could happen? Maybe it might get a bit stinky, but nothing bad could really come of this for example.
To overcome such thoughts, you might work on simply accepting your thoughts rather than resisting them.Often fighting such thoughts can only make them stronger. Instead, work on naturally ridding yourself of such thoughts through the remembrance of Allah (swt) so the thoughts may not even enter your mind in the first place. Additionally, accepting them and not resisting them will let Shaytaan know that you are paying no attention to them, and His efforts are fruitless. A psychologist will be able to help you to address your problem in this way, focusing on your thought processes. It can be very hard work and will require effort and patience on your part, but it is possible to overcome these thoughts.
May Allah (swt) bring you ease with your OCD and help you to successfully overcome it.
Disclaimer: The conceptualization and recommendations stated in this response are very general and purely based on the limited information that was provided in the question. In no event shall AboutIslam, it’s volunteers, writers, scholars, counselors, or employees be held liable for any direct, indirect, exemplary, punitive, consequential or other damages whatsoever that may arise through your decision or action in the use of the services which our website provides.