Boyfriend wants me to lose weight

I have always struggled with my weight, constantly went up and down, it’s been like that my whole life.

I started dating my boyfriend 5 years ago, when I was around 20 pounds lighter. Year and a half into the relationship, I lost 20. Now, 4 years later I’m now 40 pound up from my lowest. I still shop in regular shops, not quite yet plus size, but at the higher end of the sizing scale in terms of ‘regular’ shops.

He said he no longer finds me attractive and wants me to lose weight so we can stay together.

Part of me is saying I should lose weight and the other is saying get rid of him.

I want to lose weight for myself but it feels like I’m doing it for him.

Lose weight is a really difficult mental battle for me so if you also struggle with your weight, I would really appreciate your advice.