(2) باب مَا يُقَالُ عِنْدَ الْمُصِيبَةِ
Umm Salama, the wife of the Messenger of Allah (ﷺ), reported Allah's Messenger (ﷺ) as saying:
If any servant (of Allah) who suffers a calamity says:" We belong to Allah and to Him shall we return; O Allah, reward me for my affliction and give me something better than it in exchange for it," ' Allah will give him reward for affliction, and would give him something better than it in exchange. She (Umm Salama) said: When Abu Salama died. I uttered (these very words) as I was commanded (to do) by the Messenger of Allah (ﷺ). So Allah gave me better in exchange than him. i. e. (I was taken as the wife of) the Messenger of Allah (ﷺ).
Reference: Sahih Muslim 918 b
In-book reference: Book 11, Hadith 5
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 2000