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