Dua in difficulty

When someone is in a difficulty
الْحَمْدُ لِلَّهِ الَّذِي عَافَانِي مِمَّا ابْتَلَاكَ بِهِ وَفَضَّلَنِي عَلَى كَثِيرٍ مِمَّنْ خَلَقَ تَفْضِيلَاً
"All praise belongs to Allah who has saved me from such a condition which is afflicted on you and favoured me over many creations". The virtues of this dua is that the reciter will be saved from the difficulties he has seen.

Read the dua softly so that the person in difficulty may not hear it, on the other hand if the person in difficulty is engaged in sin then it should be read aloud so that they may learn a lesson.
Before rising from a gathering
سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا أَنْتَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ
"O Allah, You are pure, I praise You and testify that there is none worthy of worship besides You. I seek forgiveness and pardon from You". If there was good talk in the gathering, this dua will seal it and if there was futile and vain talk, then this dua will recompense for it. 

(Tirmidhi Targib)
It is stated in some narrations that this dua should be read thrice.

(Hisnul Hasin)
When in any difficult
اللَّهُمَّ رَحْمَتَكَ أَرْجُو فَلَا تَكِلْنِي إِلَى نَفْسِي طَرْفَةَ عَيْنٍ وَأَصْلِحْ شَأْنِي كُلَّهُ لَا إِلَهَ إِلَّا أَنْتَ
"O Allah, I hope for Your mercy, do not leave me for even the duration of an eye blink (duration) and correct my total condition. Besides You there is none worthy of worship".

(Hisnul Hasin)
Alternate dua
حَسْبُنَا اللَّهُ وَنِعْمَ الْوَكِيلُ
"Allah is sufficient for us and He is the Best Guardian". 

(Quran, Surah Al-Imraan)
Alternatively recite
اللَّهُ اللَّهُ رَبِّي لَا أُشْرِكُ بِهِ شَيْئَاً
"Allah is my Lord, I do not ascribe anything unto Him". 

(Hisnul Hasin from Abu Dawood)
or recite
يَا حَيُّ يَا قَيُّومُ بِرَحْمَتِكَ أَسْتَغِيثُ
"O Alive and everlasting One, I beseech You by Your mercy".

(Mustadrak Hakim)
لَا إِلَهَ إِلَّا أَنْتَ سُبْحَانَكَ إِنِّي كُنْتُ مِنَ الظَّالِمِينَ
"O Allah, there is none worthy of worship besides You. You are Pure, definitely I have oppressed my soul by sinning".
The Qur'an states that these words were recited when Yunus (A.S.) called upon Allah from the belly of the fish. Prophet Mohammad (S.A.W.) stated in a hadith that when any Muslim makes this dua via these words to Allah, then Allah surely accepts his duas.

(Tirmidhi etc)
It is stated in a hadith that
لَا حَوْلَ وَلَا قُوَّةَ إِلَّا بِاللَّهِ
is the medicine for 99 ailments, the least of which is depression.

(Baihaqi in Dawatul Kubra)
It means that these words are so beneficial and useful that big/great grievances, depression and sorrow are easily removed in its stride.
Abdullah bin Abbas (R.A.) narrates that Prophet Mohammad (S.A.W.) stated that if a person constantly makes "Astaghfar", then Allah removes every difficulty, frees him from every sorrow and makes a means for him to receive sustencance from places that he never thought of.

(Mishkat from Ahmad)
When one sees a muslim laughing
أَضْحَكَ اللَّهُ سِنَّكَ
"Allah keep you laughing" (Bukhari, Muslim)
When fearing the enemy
اللَّهُمَّ إِنَّا نَجْعَلُكَ فِي نُحُورِهِمْ وَنَعُوذُ بِكَ مِنْ شُرُورِهِمْ
"O Allah, we make you the turner of the (enemies) chest (heart) and seek refuge in You from their evils".

(Abu Dawood)
When the enemy surrounds
اللَّهُمَّ اسْتُرْ عَوْرَاتِنَا وَآمِنْ رَوْعَاتِنَا
"O Allah, save our honour and remove the fear and keep us safe"

(Hisnul Hasin)