I've been in this same position, it is awkward, and embarrassing, and discouraging at times. I have a lot of food intolerances that make it so I can't eat. 1) Sometimes I bring something to snack on. 2) Other times I order a drink. 3) Sometimes I can order a side salad or something that I can pick at and never actually finish. 4) Many times I just sit and enjoy the conversation with a glass of water. Whatever your reason for not being able to eat out you still deserve to be able to spend time and bond with your coworkers. They will take their cue from you. If you are confident about your actions, they won't be as uncomfortable. Decide on something simple and quick you can say about why you aren't eating "I have food intolerances," or "I'm saving money," whatever simple truth you want to share. It takes some adjusting but you and your coworkers will adapt. Don't give up on the socializing because you can't partake of the food.
If you feel comfortable around them and you think you can trust them you should calmly explain your problem to them. You don't have to go into much detail if you don't want to - tell them that eating in public makes you feel uncomfortable and that it is nothing personal.
Avoiding eating is the bigger problem, here. Whether you are with a group of people or alone, it is very important to eat lunch. When eating with others, think of it as a social gathering rather than just eating. If you want to eat alone, start packing your own lunch.
You don't have to do anything that you aren't comfortable with. You don't have to explain your reasons to your co-workers if you choose not to. It might be worth just saying that there are other things you enjoy more. Maybe organise something different that your co workers can also get involved with so that you can still Spencer time together.