It was authentically reported in the Sunnah many Hadiths in treating the numerous types of distress which inflict a man.
Distress is the pain and severity which a person finds in himself because of calamities and afflictions that hit him and cause him sadness, agony, and worry.
Of the Hadiths reported in treating distress is the Hadith which Al Bukhari and Muslim reported on the authority of Ibn `Abbas (may Allah be pleased with him) who said that the Messenger of Allah (peace be upon him) used to say at distress: "La Ilaha Illa Allah Al `Azhim Al Halim, La Ilah Illa Allahu Rabbul `Arsh Al `Azhim, La Ilah Illa Allahu Rabbu As-Samawati Wa Rabbul Ardi Wa Rabbul `Arsh Al Karim [None has the right to be worshipped but Allah, the Knower, the Most Forbearing. None has the right to be worshipped but Allah, the Lord of the Tremendous Throne. None has the right to be worshipped but Allah, the Lord of the Heavens and the Lord of the Honorable Throne]." [Sahih Al Bukhari: No. 6346 and Sahih Muslim: No. 2703].
Abu Dawud, Ibn Majah, and others reported on the authority of Asma' bint `Umays (may Allah be pleased with her) who said: "Shall I teach you phrases which you utter in distress? (These are:) "Allah Allahu Rabbi La Ushriku Bihi Shay`a [Allah, Allah is my Lord, I do not associate any partner with Him in worship." [Sunan Abu Dawud: No. 1525 and Sunan Ibn Majah: No. 3882, and Al Albany (may Allah bestow mercy on his soul) graded it as authentic in Sahih At-Targhib: No. 1824].
Abu Dawud reported in his Sunan on the authority of Abu Bakrah (may Allah be pleased with him) who said that the Prophet (peace be upon him) said: "The supplication of a person who is in distress is: "Allahumma Rahmataka Arju Fala Takilny Ila Nafsy Tarfata `Ayn, wa Aslih Li Sha'ny Kullahu, La Ilaha Illa Ant" [O Allah, I hope for Your Mercy! Do not leave me to myself for the blink of an eye. Put all of my affair in order. There is no god but You]." [Sunan Abu Dawud: No, 5090, and Al Albany (may Allah bestow mercy on his soul) graded it as authentic in Sahih Al Jami`: No. 3388].
At-Tirmidhy reported on the authority of Sa`d ibn Abu Waqqas (mau Allah be pleased with him) who said: "The invocation of Dhun-Nun (Yunus) while he was in the stomach of the whale was: "La Ilaha Illa Ant, Subhanak Inni Kuntu minazh-Zhalimin" [There is no God but you. You are Glorified. I am one of the wrong-doers]. If a Muslim invokes Allah with it and asks for something, Allah will surely grant him that." [Sunan At-Tirmidhy: No. 3505, and Al Albany (may Allah bestow mercy on his soul) graded it as authentic in Sahih Al Jami`: No. 3383].
All these phrases reported in these Hadiths contain perfect faith, monotheism, sincerity to Allah (Glory be to Him), and keeping away from polytheism whether major or minor. This proves that the greatest treatment for distress is the renewal of faith and repeating the testimony of faith "La Ilaha Illa Allah." Any distress, hardship, worry, or concern is removed by the oneness of Allah, showing sincerity to Him, and fulfilling the meaning of worship for which a servant is created. When the heart is filled by monotheism and sincerity, it becomes easy for it to cast away distress, hardships, concerns, and becomes happy.
Ibn Al Qayyim (may Allah bestow mercy on his soul) said: Monotheism is the only refuge to His Enemies and Patrons: As for His Enemies, it saves them from the distress and hardships of the world: "And when they embark on a ship, they invoke Allâh, making their Faith pure for Him only: but when He brings them safely to land, behold, they give a share of their worship to others." [Surat Al `Ankabut: 65]. As for His Patrons, it saves them from the distress and hardships of the world as well as the Hereafter, therefore Yunus (Jonah peace be upon him) resorted to it and Allah saved him from darkness. The followers of the Messengers resorted to it, and thus they were rescued from the torture which inflicted polytheists in this world and from the torment of the Hereafter. When the Pharaoh resorted to it when he knew that he shall be perished and drowned, it did not benefit him because monotheism is not accepted at the death agony. This is the law of Allah applicable to His Servants, so the distress of the world should be removed by monotheism.
Therefore, the invocation of Dhun-Nun is the key for removing distress and nothing casts a person into distress and hardship but polytheism, as it is the shelter and the fort for the creatures against any distress, may Allah grant us success! [Al Fawa'id: P, 95-96].
We had some Hadiths which denote this meaning:
First, the Hadith of Ibn `Abbas (may Allah be pleased with him) which is full of monotheism and glorification to Allah (Glory be to Him) and repetition to the testimony of faith in addition to the glorification, perfection, and the ownership of Allah to the heavens, the earth, and the Great Throne. Those phrases contained the three types of monotheism which are: Tawhid-ul-Rububiyyah (Oneness of Allah's Lordship), Tawhid-ul-Uluhiyyah (Allah's Exclusive Right to be worshipped), and Tawhid-ul-Asma’ was-Sifat (monotheism of names and the attributes). When a Muslim says these phrases pondering over their meanings, his heart shall be comfortable, his distress and hardship are removed, and he shall be guided to the Straight Path.
Second, the Hadith of Asma' bint `Umayr (may Allah be pleased with her) when the Prophet (peace be upon him) guided her to resort to monotheism when she is inflicted by a distress or a hardship. The Prophet (peace be upon him) drew her attention to this matter and made her eager to know it and prepared her to receive the matter by a question: “Shall I teach you phrases which you utter in distress?” No doubt herself was eager to know these words, so he guided her to say: "Allah, Allahu Rabbi La Ushrika bihi Shay`a" which is the testimony of faith.
As for his saying: "Allah, Allah," it indicates the importance of the matter, so he had to repeat the word “Allah,” and the meaning is: My god, whom I worship by all acts of worship: fear, hope, submission, reverence, and humbleness, is my Lord who reared me by His Favors, created me of nothing, and granted me many blessings.
As for his saying: "La Ushrika Bihi Shay`a," it means: I do not associate anything or anyone with Him in worship.
All these great phrases included the ascertainment of monotheism with its two pillars: Negation and affirmation; negating the worship of other than Allah and affirming the worship to Allah alone.
The Hadith is a proof that monotheism is the shelter and fort in distress and one of the greatest reasons of the removal of concerns and distress.
Third, the Hadith of Abu Bakrah (may Allah be pleased with him): "The supplications of the person in distress are: "Allahumma Rahmataka Arju Fala Takilny Ila Nafsy Tarfata `Ayn, wa Aslih Li Sha'ny Kullahu, La Ilaha Illa Ant" [O Allah, I hope for our mercy! Do not leave me to myself for the blink of an eye. Put all of my affair in order. There is no god but You]" which is full of monotheism and resorting to Allah for protection.
As for the Prophet's saying: "Allahumma Rahmataka Arju," it means: We seek mercy from You only, and we do not seek it from anyone else.
As for the Prophet's saying: "Fala Takilny Ila Nafsy Tarfata `Ayn, wa Aslih Li Sha`ny Kullah," it shows humbleness and the dire need of a person to Allah, and that he cannot do without his Lord in all his affairs even for a twinkle of an eye. Therefore, the Prophet said: "Wa Aslih Li Sha'ny Kullah" which means my entire affairs and all aspects of my life. Then he concluded with that blessed invocation, the testimony of faith "La Ilaha Illa Allah."
Fourth, the Hadith of Sa`d ibn Abu Waqqas in which the invocation of Dhun-Nun (peace be upon him) when he was in the stomach of the whale was mentioned: "La Ilaha Illa Anta Subhanak Inny Kuntu Minazh-Zhalimin."
Ibn Al Qayyim (may Allah bestow mercy on his soul) commented on this invocation saying: It contains the perfection of monotheism, negating imperfection from Allah, and admission from a person of his own injustice and sins. That is the best treatment for distress, concern, and worry, as it is the best means for fulfilling one's needs. Monotheism and negation of imperfection from Allah imply attributing perfection to Allah and negating any defect.
Confession of oppression implies person's faith in: Shari`ah, reward and punishment, the necessity for returning to Allah, and admitting the dire need to Allah, so this Hadith implies four matters that are used for invocation: Monotheism, dissociation of Allah from imperfection, servitude, and confession. [Zad Al Ma`ad: 2\208].