Well the not eating and twitching/jerking is classic mating behaviour for an adult male at this time of year.
I've never known that to be directly related to a bad shed, so next time he goes blue, pop a damp hide in with him and see if this helps.
It's the bloating bit that worries me. I can't relate that to the other symptoms you've described. As he hasn't eaten in a couple of months it's unlikely to be constipation (anyone?). That part would make a trip to a reptile vet worthwhile.
Unless, of course, there's any possibility that your "he" is a "she" who might have been in contact with a male at some point since last summer. In which case, the not eating & bloating might actually be "getting ready to lay eggs". A trip to a reptile-savvy vet would confirm.