you seem to get this pain while flying.
this occurs because of the change of pressure.
middle part of Ear and throat (back of nose) are connected by a tube called eustachian tube it is because of non opening of that tube that the pressure is not distributed and in middle ear negative pressure generates and it pains.
you can take---
A Decongestant like Phenylephrine
with non sedating anti histaminic like loratidine
twice daily .for 5 days and starting 1 day prior to next flight
Tab. Acetyl cysteine
600mg once daily for 5 days and starting 1 day prior to next flight
and u can put Xylometazoline
nose drops two drops both nostril half an hour before take off and half an hour before landing.
and do keep chewing while take off and landing.