When the Messenger of Allah (ﷺ) prayed over a dead person, he said: O Allah, forgive those of us who are living and those of us who are dead, those of us who are present and those of us who are absent, our young and our old, our male and our female. O Allah, to whomsoever of us Thou givest life grant him life as a believer, and whomsoever of us Thou takest in death take him in death as a follower of Islam. O Allah, do not withhold from us the reward (of faith) and do not lead us astray after his death.
When you finish the sunset prayer, say: ‘O Allah, protect me from Hell” seven times; for if you say that and die that night, protection from it would be recorded for you; and when you finish the dawn prayer, say it in a similar way, for if you die that day, protection from it would be recorded for you. AbuSa’id told me that al-Harith said: The Messenger of Allah (ﷺ) said this to us secretly, so we confine it to our brethren.