When one is experiencing bodily pain, one should place his hand on the area which he is experiencing pain and recite the following dua an odd number of times (e.g. three times, five times or seven times)
بِسْمِ اللَّهِ، أَعُوذُ بِعِزَّةِ اللّهِ وَقُدْرَتِهِ مِنْ شَرِّ مَا أَجِدُ مِنْ وَجَعِي هَذَا
In the name of Allah Ta‘ala. I seek refuge in the greatness of Allah Ta‘ala and His power from the evil of this pain that I am experiencing.
حدثنا محمد بن سالم قال: حدثنا ثابت البناني، قال: قال لي يا محمد: إذا اشتكيت فضع يدك حيث تشتكي، ثم قل: بسم الله، أعوذ بعزة الله وقدرته من شر ما أجد من وجعي هذا، ثم ارفع يدك ثم أعد ذلك وترا. فإن أنس بن مالك، حدثني أن رسول الله صلى الله عليه وسلم حدثه بذلك. هذا حديث حسن غريب من هذا الوجه ومحمد بن سالم هذا شيخ بصري (سنن الترمذي، الرقم: 3588)
Hazrat Muhammad bin Saalim (rahimahullah) reports that Hazrat Thaabit Bunaani (rahimahullah) advised him, “O Muhammad! When you experience pain, then place your hand on the area which you experience pain and recite the following dua:
بِسْمِ اللَّهِ، أَعُوذُ بِعِزَّةِ اللّهِ وَقُدْرَتِهِ مِنْ شَرِّ مَا أَجِدُ مِنْ وَجَعِي هَذَا
Then raise your hand from the affected area. Thereafter repeat this (placing your hand on the area while reciting the abovementioned dua) an odd number of times (e.g. three times, five times or seven times).”
Hazrat Thaabit Bunaani (rahimahullah) further says, “Hazrat Anas bin Maalik (radhiyallahu ‘anhu) had mentioned to me that Rasulullah (sallallahu ‘alaihi wasallam) had mentioned this (method of seeking shifa) to him.”