I messed up
Beating yourself up over this is only going to lead to more negative thoughts and possibly actions.
You went against the plan and you paid the price.
How can you plan better to not give in?
If you drank the wine at home, I would suggest removing all temptations for now. If it was at a friends, then maybe ask them to help you abstain. If it was out, then maybe go somewhere else where alcohol is not offered.
The best way to be successful is to plan. Know your triggers and if they are going to be difficult in a situation, then avoid that situation (at least when you are weak).
We have to know ourselves and trying to be strong when you feel weak is just setting yourself up for a stumble.
So learn from this and decide to make better choices going forward.
And remember, the only way to truly fail, is to quit trying.
Beating yourself up over this won't changewhats been done. If it would none of us would have needed the surgery and we would be thin from the get go. What is important is you have learned from the mistake and know wine may be a problem for you and you need to be diligent about avoidance now. We've all made a few mistakes on our journey but the lessons (especially the dreaded claimed) help get us back on track.
If you have a therapist ... this is one to discuss. You cannot change the past but you can control the future. Please talk to someone that can help you work through the "why" this happened.
Best of luck to you.