Whenever a serious matter weighed upon the Messenger of Allah ﷺ, he would say, "There is no god but Allah, the Forbearing, the Magnificent. There is no god but Allah, Lord of the Noble Throne. There is no god but Allah, Lord of the Mighty Throne. There is no god but Allah, Lord of the heavens, Lord of the earth, and Lord of the Noble Throne." Then he would make his supplication.
حدثنا حسن يعني ابن موسى حدثنا حماد بن سلمة عن يوسف بن عبد الله بن الحارث عن أبي العالية
أن رسول الله ﷺ كان إذا حزبه أمر قال لا إله إلا الله الحليم العظيم لا إله إلا الله رب العرش الكريم لا إله إلا الله رب العرش العظيم لا إله إلا الله رب السموات ورب الأرض ورب العرش الكريم ثم يدعو
Its isnad is sahih. Yusuf bin Abdullah bin Harith is the sister's son of Muhammad bin Sirin. He is trustworthy, and Ibn Main affirmed his trustworthiness. Muslim narrated from him, Ibn Hibban mentioned him among the trustworthy narrators, and Bukhari gave his biography in al-Kabir, 4/2/372. The hadith is given at length under number 2345.