Based on your history, it can be TMJ or joint pain. It can be due to sudden force on the joint or other reasons. In the X-ray I was not able to find your third molar. Did you get a third molar recently removed. I was also able to see a root piece like structure in the 3rd molar region.
Pain may be due to infection from residual root piece of 3rd molar or sudden force during removal of third molar removal. Even clicking sounds and pain in front of ear signifies a TMJ problem.
Reason may also be a recently improperly done filling or crown. Your case need to be properly evaluated by a dentist
Next Steps
Consult a maxillofacial pain specialist
Health Tips
Use a course of antibiotics to rule out infection. Use muscle relaxant to relieve TMJ pain. Restrict urself to soft food for few weeks. If TMJ problem is diagnosed once pain comes down you need to do excercises to strengthen the joint