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.
ahmad:26739ʿAbd al-Razzāq > Sufyān > al-Aʿmash > Abū Wāʾil > Um Salamah

Whenever you visit the sick or the dead, supplicate for good because angels say" Amen" to whatever you say. She added: When Abu Salama died, I went to the Messenger of Allah ﷺ and said: Messenger of Allah, Abu Salama has died. He told me to recite:" O Allah! forgive me and him (Abu Salama) and give me a better substitute than he." So I said (this), and Allah gave me in exchange Muhammad, who is better for me than him (Abu Salama). (Using translation from Muslim 919)  

أحمد:٢٦٧٣٩حَدَّثَنَا عَبْدُ الرَّزَّاقِ قَالَ حَدَّثَنَا سُفْيَانُ عَنْ الْأَعْمَشِ عَنْ أَبِي وَائِلٍ عَنْ أُمِّ سَلَمَةَ قَالَتْ

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


See similar narrations below:

Collected by Ibn Mājah, Ṭabarānī, Suyūṭī
ibnmajah:1455Abū Dāwud Sulaymān b. Tawbah > ʿĀṣim b. ʿAlī > Qazaʿah b. Sūwayd > Ḥumayd al-Aʿraj > al-Zuhrī > Maḥmūd b. Labīd > Shaddād b. Aws

“When you come to your dead ones, close their eyes, for the sight follows the soul. And say good things, for the Angels say Amin to what the members of the household say.”  

ابن ماجة:١٤٥٥حَدَّثَنَا أَبُو دَاوُدَ سُلَيْمَانُ بْنُ تَوْبَةَ حَدَّثَنَا عَاصِمُ بْنُ عَلِيٍّ حَدَّثَنَا قَزَعَةُ بْنُ سُوَيْدٍ عَنْ حُمَيْدٍ الأَعْرَجِ عَنِ الزُّهْرِيِّ عَنْ مَحْمُودِ بْنِ لَبِيدٍ عَنْ شَدَّادِ بْنِ أَوْسٍ قَالَ

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

tabarani:20119Isḥāq b. Ibrāhīm al-Dabarī > ʿAbd al-Razzāq > al-Thawrī > al-Aʿmash > Abū Wāʾil > Um Salamah

[Machine] The Messenger of Allah ﷺ said, "When you witness a deceased person, say good things about them, for the angels will believe in what you say."  

الطبراني:٢٠١١٩حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ الدَّبَرِيُّ عَنْ عَبْدِ الرَّزَّاقِ عَنِ الثَّوْرِيِّ عَنِ الْأَعْمَشِ عَنْ أَبِي وَائِلٍ عَنْ أُمِّ سَلَمَةَ قَالَتْ

قَالَ رَسُولُ اللهِ ﷺ «إِذَا حَضَرْتُمُ الْمَيِّتَ فَقُولُوا خَيْرًا فَإِنَّ الْمَلَائِكَةَ يُؤَمِّنُونَ عَلَى مَا تَقُولُونَ»  

suyuti:1676a
Request/Fix translation

  

السيوطي:١٦٧٦a

"إِذا حَضَرتُمُ المريضَ أو الميِّتَ فقُولوا خيرًا فإِنَّ الملائِكةَ يؤمِّنون على ما تَقُولُون".  

[حم] أحمد [م] مسلم [د] أبو داود [ت] الترمذي حسن صحيح، [ن] النسائي [هـ] ابن ماجة [حب] ابن حبّان [ك] الحاكم في المستدرك عن أم سلمة