Praise be to Allah
It makes no sense and it is not prescribed in Islam in any way to expose your religious commitment to the whispers (waswas) of the Shaytan so that he may toy with it as he wishes and make you mess about with your religious commitment like someone who is gambling by swearing oaths and making vows. Your religious commitment is too important and too precious for this kind of risky behaviour. Your enemy is lying in wait for you and seeks to instil in your heart his devilish whispers, doubts and bad thoughts, so as to distract you from worship and weaken your commitment to it. And he seeks to instil anxiety and distress in your heart. You have seen how you have ended up with his whispers.
The matter is much more straightforward than that. A person’s act of worship cannot be ended or invalidated on the basis of mere uncertainty, let alone the waswas that is attacking you; that is closer to being a sickness than well-being.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) was asked: what if a person does wudu and stands to pray, then feels some wetness (such as a drop of urine etc) whilst he is praying. Does that invalidate his prayer or not?
Merely feeling something does not invalidate wudu and it is not permissible for him to exit an obligatory prayer on the basis of mere uncertainty. If he is certain that urine has been secreted to the outside of the penis, then his wudu is invalidated and he has to wash himself (istinja), unless he is suffering from urinary incontinence. But the prayer is not invalidated by a mere feeling, if he has done what is enjoined upon him.End quote from Majmoo‘ al-Fatawa, 21/219-220
Al-Shaykh Ibn Baz (may Allah have mercy on him) said:
The believer should not pay any attention to this waswas because that will make the Shaytan try harder and seek to instil even worse waswas; the Shaytan is keen to spoil the good deeds of the son of Adam, such as his prayer and other deeds. So it is essential to be aware of his tricks and whispers, to put your trust in Allah and to regard whatever happens to you of waswas as being from the Shaytan, so that you will not pay attention to it. If anything comes out and you are certain of it, without a doubt, then you should wash yourself again (istinja) and repeat wudu. But so long as there is any uncertainty, even if it is small, you should not pay any attention to that, so as to maintain that your wudu is valid and so as to combat the Shaytan.End quote from Majmoo‘ Fatawa Ibn Baz, 10/123
What you must do in order to rid yourself of this waswas is seek refuge with Allah from the accursed Shaytan and carry on with your worship, without paying attention to any whispers that the Shaytan may try to put into your mind; you should also offer a great deal of supplication (du‘a), asking Allah to keep his plots away from you.
Al-Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
As for this waswas that happen to some of the sons of Adam, whether they have to do with beliefs or with religious matters such as prayer, wudu, purification and the like, the remedy for this disease that we ask Allah to keep us and our Muslim brothers safe from is to seek refuge with Allah from the accursed Shaytan, and to ignore it (the waswas) and not pay any attention to it at all. So if the Shaytan whispers to him that something is impure (najis) or that he has nullified his wudu, when he is not certain of that, he should not pay any attention to it. If he persists in ignoring it and not paying any attention to it, it will go away with Allah’s help. End quote from Fatawa Noor ‘ala ad-Darb by Ibn ‘Uthaymeen, 6/122
With regard to your oath and vow, you made a grievous error by doing that, unless it was the waswas that got the better of you to such an extent that you did not know what you were saying. We hope that you will be pardoned for it.
You should understand that this vow on its own does not put you beyond the pale of Islam; rather it is a vow that was aimed at preventing the one who made it from doing that, because of his hatred and revulsion of kufr (disbelief). So you have to offer the expiation for breaking an oath (kaffarat yameen), and also repent to Allah, regret what you did, and pray a great deal for forgiveness (istighfar).
Shaykh al-Islam (may Allah have mercy on him) said:
The one who swears such an oath is committing himself to something he dislikes if he breaks his oath, such as if he says: If I do such and such, I will be a Jew or a Christian, or my wife will be divorced and my slave will be free and I will be obliged to walk to the House of Allah. These and similar phrases constitute an oath. This is unlike one who intends consequences, such as one who makes a vow or divorces his wife; he intends to comply with what he committed himself to. In both cases there is commitment, but the one who is regarded as swearing an oath is the one who dislikes what he has committed himself to if the conditions are met, such as if he said: if I do such and such, I will be a Jew or a Christian, because he hates kufr, even if that condition is met. The one who intends to carry out what he committed himself to doing, whether it is something he wants to do or not, is just fulfilling what he committed himself to, but it is not to be regarded as an oath. In both cases there is a commitment connected to a condition, but the one who is regarded as swearing an oath does not like to do the action he has committed himself to do. The difference between the two is proven from the Sahabah (Companions) and senior Tabi‘een (Successors), and is indicated by the Quran and the Sunnah; it is also the view of the majority of scholars.End quote from Majmoo‘ al-Fatawa, 33/60
The scholars of the Standing Committee were asked:
What is the Islamic ruling on one who says: If I do such and such I will be a kafir – then he does that thing time after time? Please note that I pray regularly and frequently complete readings of the Holy Quran. Will my previous good deeds be cancelled out? For my part, I uttered the Shahadatayn (twin declaration of faith) and did ghusl (bathed), based on my own understanding, but now I am living in a state of constant anxiety. Please note that I recite the shahadah a great deal and I always pray and do acts of obedience and pray for forgiveness?
The Committee replied: It is not permissible for the Muslim to swear to follow a religion other than Islam, because of the proven report from the Prophet (blessings and peace of Allah be upon him) that forbids that. In as-Saheehayn (al-Bukahri and Muslim) it is narrated from the Prophet (blessings and peace of Allah be upon him) that he said: “Whoever swears (if he does something or fails to do something) that he will follow a religion other than Islam, falsely and deliberately, then he is as he said, and if he meant what he said, he will never come back to Islam with his faith intact.” If he does what he swore not to do or he fails to do what he swore to do, then he has to offer expiation for breaking an oath and also repent to Allah and not swear such an oath again. But he does not become a kafir thereby; it is sufficient for him to repent and do righteous deeds, because Allah, may He be exalted, says (interpretation of the meaning):
His good deeds are not cancelled out, because he did not become a kafir; all he wanted to do was make sure that he would do something or not do something. End quote from Fatawa al-Lajnah ad-Daimah, 23/196-197
And Allah knows best.