Umm Salama bint Abu Umaya reported,

I heard the Messenger of Allah ﷺ say, "There is no Muslim who is struck by a calamity and says, 'Indeed, we belong to Allah and indeed, to Him we shall return. O Allah, reward me in my calamity and replace it for me with something better,' except that Allah will replace it for him with something better."She said, when Abu Salama died, I said to myself, "Which of the Muslims is better than Abu Salama? His was the first household to migrate to the Messenger of Allah ﷺ." Then I said the supplication, and Allah replaced him for me with the Messenger of Allah ﷺ.

Azami 8656

Sahih

عن أم سلمة قالت

سمعت رسول الله ﷺ يقول: ما من مسلم تصيبه مصيبة فيقول: إنا لله وإنا إليه راجعون. اللهم أجرني في مصيبتي، وأخلف لي خيرا منها- إلا أخلف الله له خيرا منها قالت: فلما مات أبو سلمة قلت: أي المسلمين خير من أبي سلمة أول بيت هاجر إلى رسول الله ﷺ ثم إني قلتها، فأخلف الله لي رسول الله ﷺ.

الأعظمي 8656صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Biography of the Prophet ﷺ
Chapter
Emigration of the Prophet ﷺ and his companions from Makkah to Madinah
Section
Beginning of the emigration from Makkah to Madinah
Numbering
Jami al-Kamil 8656 (2nd edition)
Azami 8656