You seem to be suffering from temporo Mandibular joint dysfunction which usually occurs secondary to dental problems. Since this joint is in relation to ear, pain usually gets referred to ear. Usually treatment involves soft diet, hot compresses and over the counter analgesics.
Next Steps
Consult nearby maxillofacial surgeon for confirmation of diagnosis and appropriate treatment for this condition