Oh my gosh, I had this same problem a couple of years ago. I still do sometimes, but now I know how to control it. I agree with Levian, don't go to a dentist they won't help with this. I went to a dentist and they told me I had TMJ which I later found out to be false. It's probably due to stress. Sometimes I feel stressed I feel a tension in my jaw and it clicks, so what I do to calm myself is hum a tune in my head. I used to just take pain killers too.