Put your hand on the place where you feel pain and say:
Bismillāh (three times).
Then say seven times:
A`ūdhu billāhi wa qudratihi min sharri mā ajidu wa uḥādhir.
Put your hand on the place where you feel pain and say:
With the Name of Allah (three times).
Then say seven times:
I seek refuge in Allah and in His Power from the evil of what I find and of what I guard against.
Reference:
Muslim 4/1728.