The Messenger of Allaah -sallAllaahu alayhi wa sallam-said:

Allaah does not afflict a slave with grief nor sadness, except that if the slave says: –

اللَّهُمَّ إِنِّي عَبْدُكَ وَابْنُ عَبْدِكَ وَابْنُ أَمَتِكَ نَاصِيَتِي بِيَدِكَ مَاضٍ فِيَّ حُكْمُكَ ، عَدْلٌ فِيَّ قَضَاؤُكَ ، أَسْأَلُكَ بِكُلِّ اسْمٍ هُوَ لَكَ سَمَّيْتَ بِهِ نَفْسَكَ أَوْ عَلَّمْتَهُ أَحَدًا مِنْ خَلْقِكَ أَوْ أَنْزَلْتَهُ فِي كِتَابِكَ أَوِ اسْتَأْثَرْتَ بِهِ فِي عِلْمِ الْغَيْبِ عِنْدَكَ أَنْ تَجْعَلَ الْقُرْآنَ رَبِيعَ قَلْبِي وَنُورَ صَدْرِي وَجِلَاءَ حُزْنِي وَذَهَابَ هَمِّي

O Allaah indeed I am Your slave, and the son of Your slave, and the son of Your female slave, my forelock is in Your Hand, Your command over me is forever executed and Your decree over me is just. I ask of You with all Your names, which belong to You, which You have named Yourself with, or which You have taught someone from Your creation or revealed it in Your Book or that which You have taken unto Your self with the knowledge of the unseen with You, that You make the Qur’aan the life of my heart and light of my breast and keep away from me my sadness, and that my grief goes away –

Allaahumma ‘innee ‘abduka, wabnu ‘abdika, wabnu amatika, nasiyatee biyadika, madhin fiyya hukmuka, adlun fiyya qadha’uka, asaluka bikulli ismin huwa laka, sammayta bihi nafsaka, aw anzaltahu fee kitabika, ‘aw allamthu ahadan min khaliqika, aw ista’tharta bihi fee ilmil ghaybi ‘indaka, án taj’alal-qurana rabee’a qalbee, wa noora sadree, wa jala’a huznee, wa thahaba hammee

Then Allaah takes away his grief and sadness and replaces it with happiness.

Silsilat Al-Ahadeeth As-Saheehah: 199

http://abdurrahman.org/knowledge/Abbas-Abu-Yahya/15-Part-3-The-Ahadeeth-of-Tawheed_-_www.AbdurRahman.org.pdf

