This excerpt is taken from Sheikh Abu Hamza Abdul Khaliq Siddiqi's book Sahih Fazail Amaal.
Allah Almighty said:
﴿إِلَّا تَنصُرُوهُ فَقَدْ نَصَرَهُ اللَّهُ إِذْ أَخْرَجَهُ الَّذِينَ كَفَرُوا ثَانِيَ اثْنَيْنِ إِذْ هُمَا فِي الْغَارِ إِذْ يَقُولُ لِصَاحِبِهِ لَا تَحْزَنْ إِنَّ اللَّهَ مَعَنَا ۖ فَأَنزَلَ اللَّهُ سَكِينَتَهُ عَلَيْهِ وَأَيَّدَهُ بِجُنُودٍ لَّمْ تَرَوْهَا وَجَعَلَ كَلِمَةَ الَّذِينَ كَفَرُوا السُّفْلَىٰ ۗ وَكَلِمَةُ اللَّهِ هِيَ الْعُلْيَا ۗ وَاللَّهُ عَزِيزٌ حَكِيمٌ﴾
"If you do not help the Messenger of Allah, Allah has already helped him when the disbelievers drove him out, while he was one of two, when they were both in the cave, and he said to his companion, 'Do not grieve; indeed Allah is with us.' So Allah sent down His tranquility upon him and supported him with soldiers you did not see, and made the word of the disbelievers the lowest, while the word of Allah was the highest. And Allah is Exalted in Might and Wise."
Reference: (9-At-Tawbah:40)
① Prophet Yaqub (Jacob) عليه السلام said:
﴿إِنَّمَا أَشْكُو بَثِّي وَحُزْنِي إِلَى اللَّهِ وَأَعْلَمُ مِنَ اللَّهِ مَا لَا تَعْلَمُونَ﴾
"I only complain of my suffering and my grief to Allah, and I know from Allah what you do not know."
Reference: (12-Yusuf:86)
② It is narrated from Abdullah bin Abbas رضي الله عنهما that the Messenger of Allah صلى الله عليه وآله وسلم used to say these words in times of intense grief:
لَا إِلَهَ إِلَّا اللَّهُ الْحَلِيمُ الْكَرِيمُ , سُبْحَانَ اللَّهِ رَبِّ الْعَرْشِ الْعَظِيمِ , سُبْحَانَ اللَّهِ رَبِّ السَّمَوَاتِ السَّبْعِ وَرَبِّ الْعَرْشِ الْكَرِيمِ
"There is no deity except Allah, the Lord of Greatness and Forbearance, there is no deity except Allah, the Lord of the heavens and the earth and the Noble Throne."
Reference: Sahih al-Bukhari, Book of Supplications, Chapter: Supplication in Distress, No: 6346 – Sahih Muslim, Book of Remembrance and Supplication, Chapter: Supplication in Distress, No: 2730.
③ Abu Bakrah رضي الله عنه said the Messenger of Allah صلى الله عليه وآله وسلم said: The prayer of a distressed person is:
دَعَوَاتُ الْمَكْرُوبِ: اللَّهُمَّ رَحْمَتَكَ أَرْجُو، فَلَا تَكِلْنِي إِلَى نَفْسِي طَرْفَةَ عَيْنٍ، وَأَصْلِحْ لِي شَأْنِي كُلَّهُ، لَا إِلَهَ إِلَّا أَنْتَ
"O Allah! I hope for Your mercy; do not entrust me to myself even for a moment. Rectify all my affairs. There is no deity except You."
Reference: Sunan Abi Dawood, Book of Manners, Chapter: What to say when one wakes up, No: 5090.
Al-Albani رحمه الله said it has a Hasan chain of narration.④ It is narrated from Abu Musa رضي الله عنه that when the Prophet صلى الله عليه وآله وسلم felt fear from a people, he would say:
اللَّهُمَّ إِنَّا نَجْعَلُكَ فِي نُحُورِهِمْ، وَنَعُوذُ بِكَ مِنْ شُرُورِهِمْ
"O Allah! We put You before them and seek refuge in You from their evil."
Reference: Musnad Ahmad: 415/4 – Sunan Abi Dawood, Chapters of Witr, Chapter: What a man says when he fears a people, No: 1537
Al-Albani رحمه الله said it is authentic.