Weight and compliments!

I have gained 40 pounds over the past 3 years due to a thyroid disease. I get so frustrated and sometimes angry inside because people tell me I look good, I don’t need to lose weight, you look good with this weight on you, or some other kind of compliment. I really don’t know how to react anymore and I really want to just yell or have a sarcastic response. I don’t know what to do! Sometimes I get tired of being nice about it. Help!