Reasons for tmj issues could be varied
Extracapsular: a masticatory system problem without joint derangement.
Intracapsular: a derangement inside the TMJ capsule
Other: a medical condition affecting the masticatory system, which often requires expertise outside of dentistry to diagnose and treat, eg, systemic, neurologic
Based on type treatment varies
First step includes correction of bite using a deprogrammer. If pain is relieved bite correction is done. If not Arthrocentesis or surgical approach may be required after a MRI at ct scan of the tmj.
As for the lump nothing can be said until diagnostics.
Next Steps
for further doubts will be glad to clarify