Sahih Muslim Book 4, Hadith Number 2002.

Chapter : What is to be said by the side of the sick and the dead.

Umm Salama reported Allah’s Messenger (may peace be upon him) 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 Apostle of Allah (may peace be upon him) and said: Messenger of Allah, Abu Salama has died. He told me to recite: “O Allah ! forgive me and him (Abu Salama) and give me a better substitute than he.” So I said (this), and Allah gave me in exchange Muhammad, who is better for me than him (Abu Salama).