Whenever I encounter these situations, I think of the perfect retort too late. The French even have a name for this situation, espirit de l'escalier. The literal translation is "the spirit of the staircase." The context is a dinner party with plenty of conversation and you are left speechless at some juncture and can't think of an appropriate response until you descend the stairway-exit for the evening.
"You shouldn't be eating that." Answer: "I appreciate your concern for my health. I've been living with diabetes for 280,000 hours, how long have you studied diabetes nutrition?"
A peripheral discussion to the food police is the good kind/bad kind of diabetes topic. When someone states, "Oh, you have the bad kind of diabetes." I'll respond with, "There's a good kind?"