The earache needs to be evaluated. I suggest examination by a ENT Specialist
to see for any local ear infection
. May be X RAY
Mastoid is advisable as well. if there is no significant problem with above evaluations then one needs consideration of doing MRI Brain to look for intracranial pathology as you mention that your pains are excruciating some times. This kind of headaches
should not be ignored.