[Machine] The Messenger of Allah ﷺ taught me these words to say when I am afflicted with hardship or distress: "There is no god but Allah, the Forbearing, the Honorable, Glorified and Exalted is He. Blessed is Allah, the Lord of the Great Throne, and all praise is due to Allah, the Lord of all worlds." Abdullah bin Ja'far used to teach this to a dead person and blow it on the afflicted area. Bukhari and Muslim have narrated this hadith in a summarized form from Qatadah, from Abu Al-'Aliyah, from Ibn Abbas.
لَقَّنَنِي رَسُولُ اللَّهِ ﷺ هَؤُلَاءِ الْكَلِمَاتِ إِذَا نَزَلَ بِي شِدَّةٌ أَوْ كَرْبٌ أَنْ أَقُولَهُنَّ «لَا إِلَهَ إِلَّا اللَّهُ الْحَلِيمُ الْكَرِيمُ سُبْحَانَهُ وَتَعَالَى تَبَارَكَ اللَّهُ رَبُّ الْعَرْشِ الْعَظِيمِ وَالْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ» قَالَ «فَكَانَ عَبْدُ اللَّهِ بْنُ جَعْفَرٍ يُلَقِّنُهَا الْمَيِّتَ وَيَنْفُثُ بِهَا عَلَى الْمَوْعُوكِ» قَدْ أَخْرَجَ الْبُخَارِيُّ وَمُسْلِمٌ هَذَا الْحَدِيثَ مُخْتَصَرًا مِنْ حَدِيثِ قَتَادَةَ عَنْ أَبِي الْعَالِيَةِ عَنِ ابْنِ عَبَّاسٍ ؓ