Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:6601Abū ʿAbdullāh al-Ḥāfiẓ > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > Abū Bakr Muḥammad b. Isḥāq al-Ṣaghānī > ʿUbaydullāh b. Mūsá > al-Aʿmash > Shaqīq > Um Salamah

[Machine] The Messenger of Allah ﷺ said: "When you attend a funeral, say something good, for the angels will affirm what you say." Abu Salamah had died, so I said, "How should I address you, O Messenger of Allah?" He said, "Say, 'Oh Allah, forgive him and grant us a good outcome after him.'" She said, "Allah granted me a better outcome than him, O Messenger of Allah." Muhammad ibn Ali ibn Kushaysh al-Muqri, who lived in Kufa, reported to us that Abu Ishaq Ibrahim ibn Abdullah al-Azdi ibn Abi Al-Azaim reported to us that Ahmad ibn Hazim reported to us that Ubaydullah narrated to us something similar to this.  

البيهقي:٦٦٠١أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا أَبُو بَكْرٍ مُحَمَّدُ بْنُ إِسْحَاقَ الصَّغَانِيُّ أنبأ عُبَيْدُ اللهِ بْنُ مُوسَى عَنِ الْأَعْمَشِ عَنْ شَقِيقٍ عَنْ أُمِّ سَلَمَةَ قَالَتْ

قَالَ رَسُولُ اللهِ ﷺ إِذَا حَضَرْتُمُ الْمَيِّتَ فَقُولُوا خَيْرًا؛ فَإِنَّ الْمَلَائِكَةَ يُؤَمِّنُونَ عَلَى مَا تَقُولُونَ قَالَتْ فَلَمَّا مَاتَ أَبُو سَلَمَةَ قُلْتُ كَيْفَ أَقُولُ يَا رَسُولَ اللهِ؟ قَالَ قُولِي اللهُمَّ اغْفِرْ لَهُ وَأَعْقِبْنَا مِنْهُ عُقْبَى صَالِحَةً قَالَتْ فَأَعْقَبَنِي اللهُ خَيْرًا مِنْهُ رَسُولَ اللهِ ﷺ 6602 وَأَخْبَرَنَا أَبُو الْحُسَيْنِ مُحَمَّدُ بْنُ عَلِيِّ بْنِ خُشَيْشٍ الْمُقْرِئُ بِالْكُوفَةِ أنبأ أَبُو إِسْحَاقَ إِبْرَاهِيمُ بْنُ عَبْدِ اللهِ الْأَزْدِيُّ ابْنُ أَبِي الْعَزَائِمِ أنبأ أَحْمَدُ بْنُ حَازِمٍ أنبأ عُبَيْدُ اللهِ أنبأ الْأَعْمَشُ مِثْلَهُ  

أَخْرَجَهُ مُسْلِمٌ فِي الصَّحِيحِ مِنْ حَدِيثِ أَبِي مُعَاوِيَةَ عَنِ الْأَعْمَشِ وَقَالَ إِذَا حَضَرْتُمُ الْمَرِيضَ أَوِ الْمَيِّتَ

See similar narrations below:

Collected by Aḥmad, Bayhaqī
ahmad:26608Yaḥyá b. Saʿīd > al-Aʿmash > Shaqīq And Ibn Numayr > al-Aʿmash > Shaqīq > Um Salamah

"I heard the Messenger of Allah say: 'When you see the dead, say something good, for the angels say Amin to whatever you say; When Abu Salamah died, I said: 'O Messenger of Allah, what should I say?' He said: 'Say" Allahummaghfirlanaa wa lahu wa a 'qibni minhu 'uqbai hasanah (O Allah, forgive us and him, and compensate me well for this loss.)"' Then Allah, the Mighty and Sublime, compensated me with Muhammad." (Using translation from Nasāʾī 1825)  

أحمد:٢٦٦٠٨حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ عَنْ الْأَعْمَشِ قَالَ حَدَّثَنِي شَقِيقٌ وَابْنُ نُمَيْرٍ قَالَ حَدَّثَنَا الْأَعْمَشُ عَنْ شَقِيقٍ عَنْ أُمِّ سَلَمَةَ قَالَتْ

سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ إِذَا حَضَرْتُمُ الْمَرِيضَ أَوِ الْمَيِّتَ فَقُولُوا خَيْرًا فَإِنَّ الْمَلَائِكَةَ تُؤَمِّنُ عَلَى مَا تَقُولُونَ قَالَتْ فَلَمَّا مَاتَ أَبُو سَلَمَةَ قُلْتُ يَا رَسُولَ اللهِ كَيْفَ أَقُولُ؟ قَالَ قُولِي اللهُمَّ اغْفِرْ لَنَا وَلَهُ وَأَعْقِبْنِي مِنْهُ عُقْبَى حَسَنَةً وَقَالَ ابْنُ نُمَيْرٍ صَالِحَةً قَالَتْ فَأَعْقَبَنِي اللهُ ﷻ مِنْهُ مُحَمَّدًا ﷺ  

bayhaqi:7124Muḥammad b. ʿAbdullāh al-Ḥāfiẓ > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > al-Ḥasan b. ʿAlī b. ʿAffān > Ibn Numayr > al-Aʿmash > Shaqīq > Um Salamah

The Messenger of Allah ﷺ: When you attend dying man, you should say good words, for the angels say Amin to what you say. When Abu Salamah died, I said: What should I say, Messenger of Allah? He said: O Allah forgive him, and give us something good in exchange. She said: So Allah gave me Muhammad ﷺ in exchange for him. (Using translation from Abū Dāʾūd 3115)   

البيهقي:٧١٢٤أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا الْحَسَنُ بْنُ عَلِيِّ بْنِ عَفَّانَ ثنا ابْنُ نُمَيْرٍ عَنِ الْأَعْمَشِ عَنْ شَقِيقٍ عَنْ أُمِّ سَلَمَةَ ؓ قَالَتْ سَمِعْتُ

رَسُولَ اللهِ ﷺ يَقُولُ إِذَا حَضَرْتُمُ الْمَيِّتَ أَوِ الْمَرِيضَ فَقُولُوا خَيْرًا؛ فَإِنَّ الْمَلَائِكَةَ يُؤَمِّنُونَ عَلَى مَا تَقُولُونَ فَلَمَّا مَاتَ أَبُو سَلَمَةَ قُلْتُ يَا رَسُولَ اللهِ مَا أَقُولُ؟ قَالَ قُولِي اللهُمَّ اغْفِرْ لَنَا وَلَهُ وَأَعْقِبْنَا مِنْهُ عُقْبَى صَالِحَةً فَقُلْتُهَا فَأَعْقَبَنِي اللهُ مُحَمَّدًا ﷺ  

أَخْرَجَهُ مُسْلِمٌ فِي الصَّحِيحِ مِنْ حَدِيثِ أَبِي مُعَاوِيَةَ عَنِ الْأَعْمَشِ