Need proper eval.
Tmd, temporomandibular dysfunction, is a complex problem involving the actual joint at times, but more often the muscles and other soft-tissue attachments as well as the complex of nerves around the face and head.
You need to be seen by a specialist who knows how to evaluate these types of problems. Not all dentists know how. Ask around.