Umm Salama reported Allah’s Messenger (Sallal lahu alaihi wasallam) as saying: 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 (Sallal lahu alaihi wasallam) and said: Messenger of Allah (Sallal lahu alaihi wasallam), Abu Salama has died. He told me to recite :
اللَّهُمَّ اغْفِرْ لِي وَلَهُ وَأَعْقِبْنِي مِنْهُ عُقْبَى حَسَنَةً
So I said (this), and Allah gave me in exchange Muhammad (Sallal lahu alaihi wasallam), who is better for me than him (Abu Salama).