It wasnarrated that Umm Salamah said:
"The Messenger of Allah (ﷺ)said:'When you visit one who is sick or dying, say good things, fortheangels say: Amin to whatever you say.' When Abu Salamah died, Icame to the Prophet (ﷺ) and said: 'O Messenger of Allah! AbuSalamahhas died.' He said: 'Say: "Allahummaghfir li wa lahu,wa a'qibni minhu'uqba hasanah (O Allah, forgive me and him, andcompensate me withsomeone better than him).'" She said: 'Isaid that, and Allahcompensated me with someone better than him:Muhammad the Messenger ofAllah (ﷺ).'" (FR)
English reference (FR): Vol. 1, Book 6, Hadith 1447 (FR)
Arabic reference (FR): Book 6, Hadith 1514 (FR)