As for times of distress, frustration and difficulty, the following supplications are very helpful:

Both al-Bukhari and Muslim reported in their Sahihs (Authentic Collections of Hadith) on the authority of Ibn `Abbas who said: The Prophet used to invoke Allah at the time of distress, saying, La ilaha illal-lahu al-`azim, al-halim, la ilaha illal-lahu rabbu-s-samawati wal-ard wa rabbu-l-`arsh il-`azim. (There is no god but Allah, the Great, the Tolerant; there is no god but Allah, the Lord of the Magnificent Throne; there is no god but Allah, the Lord of the Heaven and the earth, the Lord of the Edifying Throne.)”

Anas reported that whenever the Prophet (peace and blessings be upon him) faced a distress, he would say: Ya hayyu ya qayyumu bi rahmatika astaghithu [O the Ever-Living One, the Self-Subsisting Source of all beings, I invoke Your help].” (Reported by At-Tirmidhi)

Abu Bakrah (may Allah be pleased with him) reported that the Prophet (peace and blessings be upon him) said: “The supplication of a person in distress is to say: Allahumma rahmatak arju fala takilni ila nafsi tarfata `aynin, wa aslih li sha’ni kullahu (O Allah! I seek Your mercy; so don’t abandon me to my own devices even for an instant; straighten out all my tangled affairs for me.)” (Reported by Abu Dawud)

Asma’ bint `Umays (may Allah be pleased with her) said: The Prophet (peace and blessings be upon him) said to me: “Shall I teach you some words to say at times of distress? (You should say:) Allahu rabbi la ushriku bihi shay’an (Allah is my Lord with Whom I associate nothing.)” In another version it is stated that this should be said seven times. (Reported by Abu Dawud and Ibn Majah with a good chain of transmission)

Ibn Mas`ud (may Allah be pleased with him) reported that the Prophet (peace and blessings be upon him) said: “If one is inflicted with catastrophe, hardship or grief, and then says, ‘Allahumma inni `abduk, ibnu `abdika, ibnu amatika, nasiyati biyadika, madin fiyya hukmuka, `adlun fiyya qada’uka, as’aluka bikulli ismin huwa laka, sammayta bihi nafsaka, aw anzaltahu fi kitabika, aw `al-lamtahu ahadan min khalqika, aw ista’tharta bihi fi `ilmi al-qhaybi `indaka, an taj`ala al-qur’ana al-`azim rabi`a qalbi, wa nura basari, wa jila’a huzani, wa zahaba hammi (O Allah, surely I am your servant and the son of your servant and the son of your bondwoman, my destiny is in Your hand. You are determined in judging me and Just in your decision about me. I beseech of You with every Name of Yours with which You have named Yourself, or revealed in Your book, or taught to anyone of Your creatures, or kept secret exclusively to Yourself, (I beseech You) to make the Qur’an the spring of my heart, the light of my sight, the relief of my grief and the eradication of my catastrophe)’, then Allah will remove his grief and sadness and render it into happiness.” (Reported by Ahmad and Ibn Hibban with an authentic chain of transmission)

Sa`d ibn Abi Waqqas narrated: The Prophet (peace and blessings of Allah be upon him) said: “The supplication of Dhan-Nun (Prophet Yunus [Jonah]), with which he invoked Allah while being in the belly of the whale, is: La ilaha illa anta subhanak ini kuntu mina azh-zhalimin [There is no God but You; Glory be to You, Verily I was one of the transgressors.]. No Muslim invokes Allah with this supplication for anything without his supplication being responded to.”