حَدَّثَنِي شَهْرُ بْنُ حَوْشَبٍ قَالَ سَمِعْتُ أُمَّ سَلَمَةَ رَضِيَ اللَّهُ عَنْهَا تُحَدِّثُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ كَانَ يُكْثِرُ فِي دُعَائِهِ أَنْ يَقُولَ اللَّهُمَّ مُقَلِّبَ الْقُلُوبِ ثَبِّتْ قَلْبِي عَلَى دِينِكَ قَالَتْ قُلْتُ يَا رَسُولَ اللَّهِ أَوَإِنَّ الْقُلُوبَ لَتَتَقَلَّبُ قَالَ نَعَمْ مَا مِنْ خَلْقِ اللَّهِ مِنْ بَنِي آدَمَ مِنْ بَشَرٍ إِلَّا أَنَّ قَلْبَهُ بَيْنَ أُصْبُعَيْنِ مِنْ أَصَابِعِ اللَّهِ فَإِنْ شَاءَ اللَّهُ عَزَّ وَجَلَّ أَقَامَهُ وَإِنْ شَاءَ اللَّهُ أَزَاغَهُ فَنَسْأَلُ اللَّهَ رَبَّنَا أَنْ لَا يُزِيغَ قُلُوبَنَا بَعْدَ إِذْ هَدَانَا وَنَسْأَلُهُ أَنْ يَهَبَ لَنَا مِنْ لَدُنْهُ رَحْمَةً إِنَّهُ هُوَ الْوَهَّابُ قَالَتْ قُلْتُ يَا رَسُولَ اللَّهِ أَلَا تُعَلِّمُنِي دَعْوَةً أَدْعُو بِهَا لِنَفْسِي قَالَ بَلَى قُولِي اللَّهُمَّ رَبَّ مُحَمَّدٍ النَّبِيِّ اغْفِرْ لِي ذَنْبِي وَأَذْهِبْ غَيْظَ قَلْبِي وَأَجِرْنِي مِنْ مُضِلَّاتِ الْفِتَنِ مَا أَحْيَيْتَنَا
It is narrated from Sayyida Umm Salama (may Allah be pleased with her) that the Messenger of Allah (peace and blessings be upon him) used to frequently make this supplication: "O Allah, Turner of the hearts, keep my heart firm upon Your religion." One day I said: O Messenger of Allah! Do hearts also turn (that you supplicate so often)? He (peace and blessings be upon him) said: Yes, indeed. The heart of every human being among the children of Adam is between two fingers of the fingers of Allah Almighty. If Allah wills, He keeps it firm, and if He wills, He turns it aside. So we ask our Lord not to let our hearts deviate after He has guided us, and we ask Him to grant us mercy from Himself. Surely, He is the Bestower. I (Umm Salama) said: Will you teach me a supplication so that I may supplicate for myself with it? He (peace and blessings be upon him) said: Yes, why not. Recite this supplication: "O Allah, Lord of Muhammad the Prophet! Forgive my sin, remove the anger from my heart, and protect me from the misguiding trials as long as You keep us alive."