You seem to be suffering from temporo Mandibular joint dysfunction with myofacial pain which usually occurs secondary to dental problems. Usually it will resolve on its own within few days. You should have soft diet for a week, use hot compresses around the ear
Next Steps
Consult nearby ENT specialist or oral surgeon for confirmation of diagnosis and appropriate treatment if required