Riyad as-Salihin, Book 7, Hadith 920 (In-Book) ⓘ
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].
-عن أم سلمة رضي الله عنها قالت: قال رسول الله صلى الله عليه وسلم : "إذا حضرتم المريض، أو الميت، فقولوا خيرا، فإن الملائكة يؤمنون علي ما تقولون، قالت: فلما مات أبو سلمة، أتيت النبي صلى الله عليه وسلمى الله عليه وسلم الله عليه وسلم الله عليه وسلم فقلت: يا رسول الله، إن أبا سلمة قد مات، قال: “قولي: اللهم اغفر لي وله، واعقبني منه عقبة حسنة" فقلت: فأعقبني الله من هو خير لي منه: محمداً صلى الله عليه وسلم ."