Abu al-Qasim al-Taflisi narrated from Hammad b. ‘Isa from Hariz b. ‘Abd Allah al-Sijistani from Abu ‘Abd Allah al-Sadiq, peace be upon him, that Hariz said: I said “O son of the Messenger of Allah, I experience anxieties (al-balabil) in my breast and temptations (al-wasawis) in my heart (al-fu’ad) so that I sometimes break off my prayer and become confused in my recitation.” Abu ‘Abd Allah said: "And what about the invocation of Amir al-Mu’minin, peace be upon him?” I replied: “O son of the Messenger of Allah, teach [it to] me.”
He said: “When you experience something of this, place your hand on it and say:
‘In the Name of Allah and by Allah. O Allah, You have blessed me with faith, and entrusted me with the Qur'an, and bestowed on me fasting in the month of Ramadan.
Grant me mercy and acceptance and compassion and forgiveness and all that You have conferred on me of blessings and beneficence.
O Compassionate. O Benefactor, O Everlasting, O Merciful, Glory be to You. I have no one but You, Glory be to You. I take refuge in You, after these expressions of esteem, from abasement. I ask You to remove the sorrows from my heart.’
Repeat this three times and you will be cured of it, with the help of Allah, the Exalted. Then bless the Prophet, blessings of Allah upon him, and mercy and blessings upon his family.”