To add: I think it clearly upset you due to your previous issues around food and body image and because the comment came at unexpected time and in an unexpected place, where you could reasonably expect to be protected by professionalism.
You went from feeling safe, to unsafe.
Try to identify and name your feelings and put them into context. This man thought he was being funny, not personal (men in the workplace are often idiots). I wouldn't make an issue of it unless it happens repeatedly, but if you decide to make a complaint (formally or not) then I would support your decision to do so.
If it happens again, you respond with something along the lines of, "do you really think it's appropriate to comment on someone's eating habits, John?' Delivered in an arch tone.
If you'd like to address it directly with him, then I'd suggest something along the lines of, "I know it was banter, but I didn't appreciate the comment you made about my eating on X day. It made me uncomfortable, please do not make such remarks again".
You can then take it further if you need to, ie if he reacts badly or carries on.
Also, please remember that a healthy relationship with food includes indulgences like having both some cake & a doughnut on one day. It can also be hard to maintain meals without sugar spikes during a working day in an office. Please don't let his comment get to you, your eating showed how far you've come since your issues around food - don't let a thoughtless remark from an ignorant tit at work derail you. You know better than he does and his comment was a reflection on him and his unhealthy attitude, not yours.