Umm Salama bint Abu Umaya reported,

The Messenger of Allah ﷺ said, "When you are present with the sick or the dying, speak good words, for the angels say 'Amen' to what you say."She said, when Abu Salama died, I came to the Prophet ﷺ and said, "Messenger of Allah, Abu Salama has died."He said, "Say, 'O Allah, forgive me and him, and grant me a good successor after him.'"She said, so I said it, and Allah granted me one who was better for me than him, Muhammad ﷺ.

Muslim 2129

Sahih

حدثنا أبو بكر بن أبي شيبة وأبو كريب قالا حدثنا أبو معاوية عن الأعمش عن شقيق

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

قال رسول الله ﷺ إذا حضرتم المريض أو الميت فقولوا خيرا فإن الملائكة يؤمنون على ما تقولون قالت فلما مات أبو سلمة أتيت النبي ﷺ فقلت يا رسول الله إن أبا سلمة قد مات قال قولي اللهم اغفر لي وله وأعقبني منه عقبى حسنة قالت فقلت فأعقبني الله من هو خير لي منه محمدا ﷺ

مسلم 2129صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Funerals
Chapter
What is said in the presence of the sick and the dying
Numbering
Darussalam 2129
Muslim 2129