The prayer Umm Salamah hated to say
Her husband had just died and she could not imagine anyone after him.
اللَّهُمَّ اغْفِرْ لَنَا وَلَهُ وَأَعْقِبْنِي مِنْهُ عُقْبَى حَسَنَةً
Allāhumma-ghfir lanā wa lahu wa aʿqibnī minhu ʿuqbā ḥasanah
“O Allah, forgive us and forgive him, and give me after him a good successor.”
She also reported the rule around it. When you sit with the dying, say good things, because the angels say amīn to whatever you say.
Where this comes from
Abu Salamah died and she asked what to say. He gave her these words. She said it. And she is the one who reported the ending herself: Allah gave me Muhammad after him. She could not have written that ending. She said the words before she could see it.
The full narration
It was narrated that Umm Salamah said:"I heard the Messenger of Allah say: 'When you see the dead, say something good, for the angels say Amin to whatever you say; When Abu Salamah died, I said: 'O Messenger of Allah, what should I say?' He said: 'Say" Allahummaghfirlanaa wa lahu wa a 'qibni minhu 'uqbai hasanah (O Allah, forgive us and him, and compensate me well for this loss.)"' Then Allah, the Mighty and Sublime, compensated me with Muhammad
Source
Sunan an-Nasā'ī · 1825
- Abu Ghuddah: Sahih
- Al-Albani: Sahih
- Zubair Ali Zai: Sahih Muslim