Mishkat al-Masabih 1618
وَعَنْ أُمِّ سَلَمَةَ قَالَتْ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: مَا مِنْ مُسْلِمٍ تُصِيبُهُ مُصِيبَةٌ فَيَقُولُ مَا أَمَرَهُ اللَّهُ بِهِ: (إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ) اللَّهُمَّ أَجِرْنِي فِي مُصِيبَتِي وَاخْلُفْ لِي خَيْرًا مِنْهَا إِلَّا أَخْلَفَ اللَّهُ لَهُ خَيْرًا مِنْهَا . فَلَمَّا مَاتَ أَبُو سَلمَة قَالَت: أَيُّ الْمُسْلِمِينَ خَيْرٌ مِنْ أَبِي سَلَمَةَ؟ أَوَّلُ بَيْتِ هَاجَرَ إِلَى رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ثُمَّ إِنِّي قُلْتُهَا فَأَخْلَفَ اللَّهُ لِي رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ. رَوَاهُ مُسلم
From Umm Salamah, who said: The Messenger of Allah ﷺ said: "There is no Muslim who is struck by a calamity and says what Allah has commanded him: 'Indeed, we belong to Allah, and to Him we will return. O Allah, reward me in my calamity and replace it for me with something better than it,' except that Allah replaces it for him with something better than it." When Abu Salamah died, she said: "Which of the Muslims is better than Abu Salamah? His was the first household to emigrate to the Messenger of Allah ﷺ." Then I said it, and Allah replaced him for me with the Messenger of Allah ﷺ. Reported by Muslim.