The Prophet (SAW) used to stop after burying the dead and say to the people: ”Ask Allah to forgive your brother and pray for him to be strengthened, for indeed he is now being questioned.”
اللَّهُمَّ اغْفِرْ لَهُ، اللَّهُمَّ ثَبِّتْهُ
O Allah, forgive him. O Allah, strengthen him.
Allaahum-maghfir lahu Allaahumma thabbithu.
Abu Dawud 3/315, and Al-Hakim 1/370 who graded it authentic and Ath-Thahabi agreed.