إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ، اللَّهُمَّ أَجِرْنِي فِي مُصِيبَتِي وَاخْلُفْ لِي خَيْرًا مِنْهَا
Inna lillahi wa inna ilayhi raji'un, Allahumma ajirni fi musibati wakhluf li khayran minha
إنا لله وإنا إليه راجعون، اللهم أجرني في مصيبتي واخلف لي خيرا منها
Recite when facing any calamity or loss
Umm Salamah (RA) said this when her husband died, and Allah replaced him with the Prophet (PBUH) as her husband.