Apart from the infallibles, other people might, at times, experience ebbs and flows, ups and downs in their beliefs and conviction. Thus they might doubt the existence of God or the genuineness of a divine injunction or start having disorders in their practices but they get back to normalcy by seeking help from Allah, combating and resisting temptations. The first step to combat obsession is to find the root cause or the origin of obsession disorder. Some obsessions emanate from a lack of information or mistake in receiving and analyzing religious information in which case one should, through further reading, discuss with learned people, improve his knowledge and enrich himself and get rid of shortcomings.
In some cases, sinning and committing offense cause one's beliefs to be weak and unsteady leading the individual to have intellectual obsession in which case he should by, seeking divine forgiveness and regretting his past, make up for the past and do away with obsession and its causes. Sometimes, a lack of faith and self-confidence causes one to become obsessive in which case he should strengthen his faith and improve his self-confidence.
Anyone suffering from obsessive compulsive disorder or any kind of psychological disorder should make efforts to do away with the problem by trusting in Allah and by way of improving his self-confidence. If he follows the steps we have mentioned below, he should not worry.
Undoubtedly, excessive and constant doubt which makes a person obsessive is the temptation of Shaitan (Satan) but at the same time it is something natural which can be cured through a proper course of action. It should be noted that treating the problem will require time and it should take place gradually.
Apart from the infallibles, other people might, at times, experience ebbs and flows, ups and downs in their beliefs and conviction. Thus they might doubt the existence of God or the genuineness of a divine injunction or start having disorders in their practices but they get back to normalcy by seeking help from Allah and combating and resisting doubts and temptations. The first step to combat obsession is to find the root cause or the origin of an anomaly. Some obsessions emanate from a lack of information or mistake in receiving and analyzing religious information in which case one should, through further reading, discussing with learned people, improve his knowledge and enrich himself and get rid of weaknesses.
Sometimes, one encounters doubts which not only are not harmful but they are useful and tantamount to faithfulness.
The doubts are of two types: One is temporary which leads to faith and belief; another is permanent doubt. Permanent doubts are among the psychological ailments endangering the psychological and physical wellbeing of an individual and society. It should, therefore, be treated carefully. To explain further, since knowledge and certainty bring about peace and tranquility of the soul as well as cause perfection, on the contract, doubt causes stress and anxiety hampering movement and perfection. For this reason, in Islam, doubt is sometimes tantamount to polytheism. In their philosophical and academic works, Muslim philosophers have also given priority to criticizing and rejecting skepticism. They have, by way of expressing thoughts and beliefs, combated this disease so as to save society from this danger.
As for temporary doubt which leads to belief, it is not bad and no one has condemned it; rather it is a sign of rational and intellectual maturity. To clarify it further, there are two kinds of growth. One is intellectual and the other is physical. The first type is called intellectual maturity and the second one is called physical growth or adulthood. Maturity begins from age nine (9) and it becomes complete at the age of forty. Mulla Sadra is of the view that first of all material and physical characteristics come into being in man causing him to become strong and then the psychological characteristics come into being and become available.
It seems one of the reasons the youth encounter doubt in ideological matters after they attain the age of puberty, is rooted in the same point. That is to say, at the age of puberty, the intellect starts becoming active but it has been in touch with material objects for most of the time. As for non-material objects, it was not familiar with metaphysical sphere or it could not reach its depth. When puberty coincides with the evolutionary movement of the intellect, the individual wants to attain the depth of beliefs and understand its reality. That is when he comes across a lot of questions. That does not necessarily mean that this type of doubt is not a disease and should not be treated; in fact, it means that one should not be afraid of it and that one should carefully treat it without having to worry.
In any case, it seems that this kind of doubt is not bad; in fact, if it is properly managed, it will help the individual attain prosperity. The best way to manage it is to be in touch with conscious, knowledgeable and sympathetic scholars.
A noteworthy point is that anxiety emanates from a state of doubt and hesitation and this is a good of sign of spiritual wellbeing. In fact, according to prophetic traditions, feeling anxious is a sign of pure faith.
Someone went to the Prophet (S) and said: "O Messenger of Allah, I am perished." The Messenger of Allah said that Satan came to you and asked "Who created you?" and you said: "God." Then he asked: "Who created God?" And the man said: "It is true, O Messenger of Allah." Then the Prophet (S) said: "This is pure faith.",
In some cases, committing sins causes one's beliefs to become weak. In such a case, one must repent and seek divine forgiveness and by making up for sins he should do away with anything that leads to temptation.
In some cases, a lack of faith and self-confidence causes one to become obsessive in which case he should strengthen his faith and improve his self-confidence. Keeping in view what you have mentioned about yourself and the obsession your are encountering, it seems that obsession disorder is meager and you do not have to worry. By trusting in Allah and by way of self-confidence, you can do away with the little obsession by following the guidelines provided above.
For further information, see the following articles:
How to cure obsession disorder?
Obsessive compulsive disorder and its cure.
Kulayni, Kafi, vol.2, p.129, "عَنْ سُفْيَانَ بْنِ عُيَيْنَةَ قَالَ سَمِعْتُ أَبَا عَبْدِ اللَّهِ ع وَ هُوَ يَقُولُ كُلُّ قَلْبٍ فِيهِ شَكٌّ أَوْ شِرْكٌ فَهُوَه سَاقِطٌ".
 Hasan Zadeh Amuli, Hasan, Ma'refat al-Nafs (Knowledge of Self), vol.1, p. 5-12, Scientific and Cultural Publications Center, 1362 (Persian calendar).
 Mulla Sadra, Asfar, vol.9, p. 93, The first characteristic which emerges in man's soul is the characteristic of being a quadruped which overpowers lust and voluptuousness in a child. Thereupon, the characteristic of ferociousness comes into being which leads to enmity and violence. Then the satanic characteristic comes into being which causes cunningness and trickery in him. Then there is the trait of intelligence which causes the light of faith to come into being. It is with Allah, the Exalted, and the army of angels. The power of reason starts growing from the beginning of maturity and attains perfection at the age of forty. But the army of satans finds room in the heart before maturity overpowering him. The soul becomes tamed with them and is free in obeying them in matters of lust and passion. But when the individual becomes mature, the army of intellect or reason starts growing in the heart. The fight and combat begins in the field of heart. Then if the intellect is weak, the Shaitan overpowers him and this person will finally be among the army of Shaitan and will be resurrected with them on the Day of Judgment. And if the intellect is strengthened with the light of knowledge and belief, it will take under control all the powers and man will be like angels and he will be resurrected with them.
 Kulayni, Kafi, vol.2, p. 425, fourth edition, Dar al-Kotob al-Islamiyah, Tehran, 1365 (Persian calendar).
 Extracted from answer 4895 (site: 5356); Index: Doubt in Beliefs