I know this probably isn't going to be a popular answer but I wonder how much you've spoken to him about your weight over the course of your relationship and/or how much it's impacted your relationship. I wonder because SOs aren't magical creatures, they're human beings, and it weighs on a person to live with someone who is miserable with a situation they routinely cease to work on changing.
Before anyone gets upset, I've had Generalized Anxiety, Social Anxiety, and Depression for 12 years so I'm already well-versed on them. I've also had to lose weight twice, 30 pounds the first time, 50 (with more to go) the second. I used to complain to my own ex quite a bit about my weight. I didn't really begin changing myself until after we split up. Before that, I'd make half-hearted attempts at it. Meanwhile, I'd wear him down by whining.
I did the same with my current boyfriend for a bit - I just asked him if I did the same and he point blank said yes - but I've stopped. Instead, we go to the gym together and he's happy with me for it.
I didn't get the feeling he was telling her to develop an eating disorder but rather that some women will starve themselves to lose weight - which, speaking as someone who has done this in her past, is hard - while his own girlfriend can't stay under a reasonable number of calories which is healthy and doable. If he hears it a lot, if it impacts their relationship - which it seems to be if he's angry that she's insecure around him (yes, this weighs on a relationship) - then it's doing damage to them both
. Weight loss journeys aren't always about just the individual seeking to slim down. As her weight and her emotions yo-yo, he deals with the affects.
Did he go about it the right way? No. Does he have a valid point? Possibly. The OP's friends are being "supportive" but what does that really mean if she's not losing weight and keeping it off? If she's still depressed and anxious and yo-yoing, what is she gaining here? Maybe neither
approach is useful and she needs to find what works for her. His harsh style just upsets her but whatever her friends are doing hasn't seemed to make her healthier. So what is it the OP needs?
As long as her emotions and weight fluctuate together, it will be very difficult for her to be in a relationship with anyone. Her relationship with herself suffers too greatly. Going by the info under your name, it would seem you've already lost a good chunk of weight. Why not feel proud of yourself?