The Messenger of Allah ﷺ used to say frequently in his supplication, "O Allah, Turner of hearts, make my heart firm upon Your religion."She said, "I asked, 'Messenger of Allah, do hearts really turn?'"He replied, "Yes. There is no human being whom Allah has created from the children of Adam whose heart is not between two of the fingers of Allah. If Allah wills, He keeps it upright, and if He wills, He turns it astray. So we ask Allah our Lord not to turn our hearts astray after He has guided us, and we ask Him to bestow upon us mercy from Himself. Indeed, He is the Bestower."She said, "I asked, 'Messenger of Allah, will you not teach me a supplication that I may make for myself?'"He answered, "Of course. Say, 'O Allah, Lord of the Prophet Muhammad, forgive my sin, remove the rage of my heart, and protect me from the misleading trials for as long as You keep us alive.'"
كان رسول الله ﷺ يكثر في دعائه أن يقول: اللهم مقلب القلوب، ثبت قلبي على دينك. قالت: قلت: يا رسول الله، أو إن القلوب لتتقلب؟ قال: نعم، ما من خلق الله من بني آدم من بشر إلا أن قلبه بين إصبعين من أصابع الله، فإن شاء الله عز وجل أقامه، وإن شاء أزاغه، فنسأل الله ربنا أن لا يزيغ قلوبنا بعد إذ هدانا، ونسأله أن يهب لنا من لدنه رحمة، إنه هو الوهاب. قالت: قلت: يا رسول الله، ألا تعلمني دعوة أدعو بها لنفسي؟ قال: بلى، قولي: اللهم رب النبي محمد اغفر ذنبي، وأذهب غيظ قلبي، وأجرني من مضلات الفتن ما أحييتنا.
Imam Ahmad narrated it (26576), and Tabarani in Al-Kabir (23/338), and in Al-Dua (1258), through several chains from Abdul-Hameed, who said, Shahr bin Hawshab told me, saying, I heard Umm Salama narrate that the Messenger of Allahﷺ used to frequently say in his supplication (then he mentioned it). Ibn Khuzayma graded it sahih and narrated it in Kitab al-Tawhid (133) through another route from Shahr bin Hawshab, with the same wording, similarly.Its chain is hasan due to the discussion surrounding Shahr bin Hawshab, for he is truthful so long as he does not contradict others in the chain, and nothing appears in the text that would be objected to from him. This hadith has corroborating witnesses for its various parts.Abdul-Hameed is Ibn Bahram al-Fazari, the companion of Shahr bin Hawshab. Abu Hatim and Ibn Adi both said of him, "There is no harm in him," and Ibn Hibban mentioned him in Al-Thiqat (120/7).