وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ رَبِيعَةَ بْنِ أَبِي عَبْدِ الرَّحْمَنِ، عَنْ أُمِّ سَلَمَةَ، زَوْجِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ، أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ مَنْ أَصَابَتْهُ مُصِيبَةٌ فَقَالَ كَمَا أَمَرَ اللَّهُ (إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ) اللَّهُمَّ أْجُرْنِي فِي مُصِيبَتِي وَأَعْقِبْنِي خَيْرًا مِنْهَا إِلَّا فَعَلَ اللَّهُ ذَلِكَ بِهِ قَالَتْ أُمُّ سَلَمَةَ فَلَمَّا تُوُفِّيَ أَبُو سَلَمَةَ قُلْتُ ذَلِكَ ثُمَّ قُلْتُ وَمَنْ خَيْرٌ مِنْ أَبِي سَلَمَةَ فَأَعْقَبَهَا اللَّهُ رَسُولَهُ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَتَزَوَّجَهَا

Yahya related to me from Malik from Rabia ibn Abi Abd ar-Rahmanfrom Umm Salama, the wife of the Prophet may Allah bless him and granthim peace, that the Messenger of Allah, may Allah bless him and granthim peace, said, "If a misfortune befalls some one and he says, asAllah has ordered, 'We belong to Allah and to Him we are returning. OAllah, reward me in my misfortune and give me better than itafterwards,' Allah will do that for him" (Inna lillahi wa inna ilayhirajiun. Allahumma' jurniy fi musiybatiy, wa a qibhiy khayran minha,illa faala 'llahu dhalika bihi.). Umm Salama said, "When AbuSalama died I said that, and then I said, 'Who is better than AbuSalama?' " And then Allah left her the Messenger of Allah, may Allahbless him and grant him peace, and he married her. Translation Not Available

Book Ref: Muwatta Imam Malik Book 16 Hadith 564
Web Ref:  Muwatta Imam Malik Book 16 Hadith 42