عَنْ أُمِّ سَلَمَةَ زَوْجِ النَّبِيِّ رَضِيَ اللَّهُ عَنْهَا قَالَتْ: سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ يَقُولُ: ((مَا مِنْ عَبْدٍ تُصِيبُهُ مُصَيبَةٌ فَيَقُولُ إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ، اللَّهُمَّ أَجُرْنِي فِي مُصِيبَتِي (وَفِي رِوَايَةٍ: اللَّهُمَّ عِنْدَكَ أَحْتَسِبُ مُصِيبَتِي، فَأَجُرْنِي فِيهَا) وَاخْلُفْ لِي خَيْرًا مِنْهَا إِلَّا أَجَرَهُ اللَّهُ فِي مُصِيبَتِهِ وَخَلَفَ لَهُ خَيْرًا مِنْهَا))، قَالَتْ: فَلَمَّا تُوُفِّيَ أَبُو سَلَمَةَ، قُلْتُ: مَنْ خَيْرٌ مِنْ أَبِي سَلَمَةَ صَاحِبِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ، قَالَتْ: فَعَزَمَ اللَّهُ عَزَّ وَجَلَّ لِي، فَقُلْتُهَا: اللَّهُمَّ أَجُرْنِي فِي مُصِيبَتِي وَاخْلُفْ لِي خَيْرًا مِنْهَا، قَالَتْ: فَتَزَوَّجْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ
The wife of the Messenger, Sayyidah Umm Salamah (may Allah be pleased with her), says: I heard the Messenger of Allah (peace and blessings be upon him) say: Whoever is afflicted by a calamity and recites this supplication: "Inna lillahi wa inna ilayhi raji'un. Allahumma 'indaka ahtasibu musibati, fa'jurni fiha wakhluf li khayran minha." (Surely we belong to Allah and to Him we shall return. O Allah! I seek reward for my calamity with You, so grant me reward in it and grant me a better substitute for it), then Allah Almighty grants him reward in his calamity and gives him a better substitute.
It happened that when my husband, Sayyiduna Abu Salamah (may Allah be pleased with him), passed away, I said: Who could be better than Abu Salamah, who was a companion of the Messenger of Allah (peace and blessings be upon him)? Nevertheless, Allah Almighty gave me strength and I continued to recite this supplication: "Allahumma ajurni fi musibati wakhluf li khayran minha." (O Allah! Grant me reward in this calamity and grant me a better substitute for it.) So (as a result of this), I married the Messenger of Allah (peace and blessings be upon him).