I sympathise. I know how painful this condition is.
1. Try to reduce anxiety with meditation, deep breathing, massage etc.
2. Magnesium supplements and muscle relaxant creams or sprays.
3. Chomping down on a small piece of wood like a one inch piece of toothpick or paddle pop stick clamped between the upper and lower molars.
4. Sticking out the tongue and holding it between your teeth for as long as possible will relieve pain and prevent clenching (although it looks pretty silly). Biting your bottom lip works too (not as effective).
5. Periodically drop your shoulders towards the floor or stretch your neck by bringing each ear towards your shoulder in turn.
6. Never open your mouth wide, but try to keep your teeth slightly apart.
7. Avoid hard or chewy foods.
8. I've heard Botox injections from a dentist can help, though I've never tried it myself.
Mine's pretty much disappeared after learning to manage my anxiety. Hope it gets better soon.
_________________
It's like I'm sleepwalking