The Prophet Muhammad (pbuh) taught Umm Salama (RA) the prayer known as Dua Ne’mul Badal after viewing her grief over her husband’s death.
Janabe Umme Salama (RA) was a widow in Medina who was in distress when she asked the Prophet (pbuh) for a prayer. During the Battle of Uhud, Umme Salama’s (RA) husband Abu Salama Abd Allah ibn Abd al-Asad—whom she regarded as the best in the world was killed. She was asked to perform this dua by the Prophet (pbuh). As a result, she married the best human being on Earth, Prophet Muhammad (pbuh), at a time when she had little possibility of living a dignified and good life.
Dua Ne’mul Badal in Arabic
إِنَّا لِلَّهِ وَإِنَّا إِلَيْهِ رَاجِعُوْنَ، اَللَّهُمَّ أْجُرْنِيْ فِيْ مُصِيْبَتِيْ وَأَخْلِفْ لِيْ خَيْرًا مِنْهَا.
Transliteration: ‘Innaa lillaahi wa ‘innaa ‘ilayhi raaji’oon, Allaahumma’-jurni fee museebatee wa ‘akhliflee khayran minhaa
Translation: ‘To Allaah we belong and unto Him is our return. O Allaah, recompense me for my affliction and replace it for me with something better.’
[ Muslim 2/632 ]
When to recite Dua Ne’mul Badal: You can say this dua if you’re upset about losing something you really desired. Allah (swt) will provide you with better, Inshallah.