The first question you should ask of the organizer if the potluck is mandatory. If it's not, then you are free not to show up. People have other plans all the time, even if their plan is atually to have lunch by themselves.
If the potluck is not mandatory but you feel social pressure to show up, the second question you should ask is who is sponsoring the potluck. If your employer is sponsoring the potluck, then there IS social pressure to show up. If someone on the staff or not in your management hierarchy took it up themselves to spontaneously organize a potluck, then I'd treat showing up at the potluck as optional.
I'll assume for the sake of coming up with a comprehensive answer that you are feeling social pressure to show up. Or that you've been notified that showing up for the potluck is mandatory.
You are not being forced to eat food that you don't want to eat e.g. if you are on a diet as per Racheet's comment, nobody is forcing you to break it.
Bring your own food from home and bring a little more food than usual, if you feel like sharing.
If you buy lunch for yourself and you don't want to make any effort, buy some fruit or a bag of cheap cookies to contribute.
Taking into account Racheet's comment that many don't eat lunch: you have given no indication that you're the type who doesn't eat lunch or who is fasting. Again, no one is forcing you to eat. Even though you are not eating lunch for whatever reason, you might consider being gracious and parting with enough cash to contribute say a bag of cookies.
If you don't want to spend ANY money on the potluck and you don't want to be seen as a scrooge, then you'll have to come up with your own excuse.
Taking into account Sean Houlihan's comment that the organizer should appreciate that some people find being compelled to participate is stressful, they'll have to reach out to the organizer and explain why. If the potluck is company sponsored and some disability is involved and we are in the United States, the employer is required to make reasonable accommodations for the disability.
If the potluck is mandatory or if you feel the social pressure to show up i.e. you are "strongly encouraged to attend" with your manager taking note as who is not showing up: the purpose of the potluck is team building. Declining to participate in the potluck amounts to declining to participate in the team building. The organizer of the potluck probably won't take it kindly that you don't participate in the potluck since it amounts to declining to participate in the team building. Aside from that, you have to eat lunch and pay for lunch regardless of whether there is a potluck. Shelling out a little more for the potluck is a small price to pay for navigating your way out of this potluck. Having said that, it's your money - you decide.