In my humble opinion you should not self medicate without knowing the exact origin of pain
. Taking medicines blindly will cause more harm than good. You should first get checked by your dentist
to evaluate whether the pain is linked to any dental problem or not. If not then you should consult an Ophthalmologist
(eye specialist) or where the dentist refers you. Hope this helps.