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.