Supplication to be made soon after a Person's Death
باب ما يقوله بعد تغميض الميت
Riyad as-Saliheen, Book of Visiting the Sick(view book)
Riyad as-Saliheen 920
Umm Salamah (May Allah be pleased with her):
The Messenger of Allah ﷺ said, "When you visit a sick or a dying person, you should utter good words because the angels say `Amin' at what you say.'' She added: When Abu Salamah (May Allah be pleased with him) died, I came to the Prophet ﷺ and said: "O Messenger of Allah, Abu Salamah has died." He ﷺ directed me to supplicate thus: "Allahummaghfir li wa lahu, wa a`qibni minhu `uqba hasanatan [O Allah, forgive me and him, and bestow upon me a better future (give me a better substitute)]." So I supplicated as he directed, and Allah gave me a man who was better for me than Abu Salamah (i.e., the Prophet Muhammad ﷺ). (The Prophet ﷺ married Umm Salamah afterwards.)
[Muslim].
-عن أم سلمة رضي الله عنها قالت: قال رسول الله ﷺ : "إذا حضرتم المريض، أو الميت، فقولوا خيرا، فإن الملائكة يؤمنون علي ما تقولون، قالت: فلما مات أبو سلمة، أتيت النبي ﷺى الله عليه وسلم الله عليه وسلم الله عليه وسلم فقلت: يا رسول الله، إن أبا سلمة قد مات، قال: “قولي: اللهم اغفر لي وله، واعقبني منه عقبة حسنة" فقلت: فأعقبني الله من هو خير لي منه: محمداً ﷺ ."