On hearing of the death:
إِنَّا لِلَّهِ وَإِنَّآ إِلَيْهِ رَٰجِعُونَ
Inna lillahi wa inna ilayhi raji’un
“Indeed to Allah do we belong and to Him we shall return.”
Reference: Surah al-Baqarah Verse 156
Entering the graveyard dua:
السَّلامُ عَلَـيْكُمْ أَهْلَ الدِّيارِ مِنَ المؤْمِنيـنَ وَالْمُسْلِمين وَإِنّا إِنْ شاءَ اللهُ بِكُـمْ لاحِقـو ن نَسْـاَلُ اللهَ
لنـا وَلَكُـمْ العـافِيَة
Assalamu `alaykum ahlad-diyari minal-mu’minina wa ‘l-muslimin. wa inna in sha’ Allahu bikum laḥiqunnas’alullāha lana wa lakumul-afiyah.
” Peace be upon you, the inhabitants of the abode, among the believers, and Muslims, and God willing we shall join you. I beg of Allah peace for us and for you.”
Reference: Sahih Muslim 975