You seem to be suffering from temporo Mandibular joint dysfunction secondary to dental problems. Usually it will resolve with simple measures such as soft diet, painkillers, hot compresses and treatment of any dental related issues.
Next Steps
Consult nearby maxillofacial surgeon for confirmation of diagnosis and appropriate treatment if required