Mishkat al-Masabih 1533
وَعَنْ عُثْمَانَ بْنِ أَبِي الْعَاصِ أَنَّهُ شَكَا إِلَى رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَجَعًا يَجِدُهُ فِي جَسَدِهِ فَقَالَ لَهُ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: ضَعْ يَدَكَ عَلَى الَّذِي يَأْلَمُ مِنْ جَسَدِكَ وَقُلْ: بِسْمِ اللَّهِ ثَلَاثًا وَقُلْ سَبْعَ مَرَّاتٍ: أَعُوذُ بِعِزَّةِ اللَّهِ وَقُدْرَتِهِ مِنْ شَرِّ مَا أَجِدُ وَأُحَاذِرُ . قَالَ: فَفَعَلْتُ فَأَذْهَبَ اللَّهُ مَا كَانَ بِي. رَوَاهُ مُسلم
From ʿUthman ibn Abi al-ʿAs: He complained to the Messenger of Allah ﷺ of a pain he felt in his body. The Messenger of Allah ﷺ said to him: "Put your hand on the part of your body that hurts and say: 'In the name of Allah' three times, and say seven times: 'I seek refuge in the might of Allah and His power from the evil of what I feel and what I fear.'" He said: So I did that, and Allah removed what I had. Reported by Muslim.