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, Lord of the earth, and Lord of the Noble Throne."
أن رسول الله ﷺ كان يقول عند الكرب: لا إله إلا الله العظيم الحليم، لا إله إلا الله رب العرش العظيم، لا إله إلا الله رب السموات ورب الأرض، ورب العرش الكريم.
Bukhari related it in the Book of Supplications (6346), and Muslim in the Book of Remembrance and Supplication (2730), both of them through the route of Hisham bin Abu Abdullah, from Qatada, from Abu Aliyah, from Ibn Abbas, who narrated it.