Anas ibn Malik reported: The Prophet, peace and blessings be upon him, whenever he encountered a difficult matter, he would say, “O Living, O Sustaining! By Your mercy, I seek deliverance!”
Source: Sunan al-Tirmidhī 3524
Grade: Sahih (authentic) according to Al-Albani
عَنْ أَنَسِ بْنِ مَالِكٍ قَالَ كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا كَرَبَهُ أَمْرٌ قَالَ يَا حَيُّ يَا قَيُّومُ بِرَحْمَتِكَ أَسْتَغِيثُ
3524 سنن الترمذي كتاب الدعوات باب منه
4777 المحدث الألباني خلاصة حكم المحدث صحيح في صحيح الجامع