The Messenger of Allah ﷺ used to say at times of distress, "There is no god but Allah, the Magnificent, the Forbearing. There is no god but Allah, Lord of the Mighty Throne. There is no god but Allah, Lord of the heavens and the earth, Lord of the Noble Throne."
حدثنا يحيى حدثنا هشام حدثنا قتادة عن أبي العالية
أن رسول الله ﷺ كان يقول عند الكرب لا إله إلا الله العظيم الحليم لا إله إلا الله رب العرش العظيم لا إله إلا الله رب السماوات والأرض رب العرش الكريم
Its isnad is sahih. Bukhari, Muslim, Tirmidhi, and Ibn Majah reported it, as noted in Dhakhair Mawarith 2788. See also 726, 1363, 1763. It will also come later at 2297, 2344, 2345, 2411, 2537, 2568.