Al-jawab billahi at-taufeeq (the answer with Allah’s guidance)
Thoughts whether voluntary or involuntary, do not break the Salaah.
Curing thoughts and doubts in Salah:
This happened to one of the Sahabah (Companions), namely ‘Uthman ibn Abu al-‘As. He came to the Prophet (Sallallahu Alaihi Wasallam) and complained about it: “The Shaytan comes between me and my Salah, and causes me to falter in my recitation.” The Messenger of Allah said: “That is a shaytan (devil) called Khinzib. If you sense his presence, seek refuge with Allah (Ta’ala) and spit (very little) to your left three times.” Uthman (later) said: “I did that, and Allah (Ta’ala) rid me of him.” (Saheeh Muslim)
This Hadith indicates two ways in which one may ward off the Shaytan who tries to disrupt one’s prayer. The first is to seek refuge with Allah (Ta’ala) from the evil of Shaytan, even by pronouncing these words whilst praying – there is nothing wrong with doing so in this case. The second is to spit to the left three times. This means blowing air in a manner similar to spitting but ejecting a very small amount of saliva, so long as this will not affect the person next to you or making the masjid dirty.
Read the following du’aa abundantly,’Laa Hawla Walaa Quwwata illaa billaah’ (There is no power – to refrain from evil – nor ability – to do good – except with Allah, the Most High, the Exalted).
And Only Allah Ta’ala Knows Best.
Moulana Qamruz Zaman