The nutritional risk of a painful jaw is how much you stop eating, not only what you eat.
How do you keep meals substantial on the bad days? Protein in soft form, snacks that need no chewing, things you batch cook? If you are losing weight without trying, that is one to raise with your doctor.