"إِذا حَضَرتُمُ المريضَ أو الميِّتَ فقُولوا خيرًا فإِنَّ الملائِكةَ يؤمِّنون على ما تَقُولُون".
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)
قَالَ النَّبِيُّ ﷺ إِذَا حَضَرْتُمُ الْمَيِّتَ أَوِ الْمَرِيضَ فَقُولُوا خَيْرًا فَإِنَّ الْمَلَائِكَةَ يُؤَمِّنُونَ عَلَى مَا تَقُولُونَ
[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."
قَالَ رَسُولُ اللهِ ﷺ «إِذَا حَضَرْتُمُ الْمَيِّتَ فَقُولُوا خَيْرًا فَإِنَّ الْمَلَائِكَةَ يُؤَمِّنُونَ عَلَى مَا تَقُولُونَ»