إِنَّ للهِ ما أَخَذ، وَلَهُ ما أَعْـطـى، وَكُـلُّ شَيءٍ عِنْـدَهُ بِأَجَلٍ مُسَـمَّى.فَلْتَصْـبِر وَلْتَحْـتَسِب.
Inna lillahi ma akhath, walahu ma aAAta, wakullu shayin AAindahu bi-ajalin musamma…faltasbir waltahtasib.
‘Verily to Allah, belongs what He took and to Him belongs what He gave, and everything with Him has an appointed time…and then he ordered for her to be patient and hope for Allah’s reward.’
The words (faltasbir waltahtasib) are commands in the feminine 3rd person form, so they will need to be changed in respect to whom is being addressed.
…and one can also say:
أَعْظَـمَ اللهُ أَجْـرَك، وَأَحْسَـنَ عَـزاءَ ك، وَغَفَـرَ لِمَـيِّتِك.
aAAthamal-lahu ajrak, wa-ahsana AAazaak, waghafara limayyitik.
‘May Allah magnify your reward, make better your solace and forgive your deceased.’
This is the saying of some of the scholars, not a hadeeth.