Hadith on Dua: To Allah we belong, to Allah we will return

Umm Salamah reported: The Messenger of Allah, peace and blessings be upon him, said, “No Muslim is afflicted with a calamity but that he should say what Allah has commanded him: Indeed, to Allah we belong and to Allah we will return. (2:156) O Allah, reward me in my affliction and replace it with something better than it. If he does so, Allah will replace it with something better.”

Source: Ṣaḥīḥ Muslim 918

Grade: Sahih (authentic) according to Muslim

عَنْ أُمِّ سَلَمَةَ أَنَّهَا قَالَتْ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ  مَا مِنْ مُسْلِمٍ تُصِيبُهُ مُصِيبَةٌ فَيَقُولُ مَا أَمَرَهُ اللَّهُ إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ اللَّهُمَّ أْجُرْنِي فِي مُصِيبَتِي وَأَخْلِفْ لِي خَيْرًا مِنْهَا إِلَّا أَخْلَفَ اللَّهُ لَهُ خَيْرًا مِنْهَا

918 صحيح مسلم كتاب الجنائز باب ما يقال عند المصيبة