I know you are struggling, but you aren't a failure. You maintained a lot of weight loss for a long time, and that is incredible. You've got the strength and fortitude to do it, but you've been through some things that pushed you in an unhealthy direction. There isn't anyone on earth who isn't susceptible to those life experiences.
I can only share info based on what I've read since I'm not quite a year out from surgery. However, the key is going to be food, period. Your smaller stomach really isn't going to be the key to success for you, as you've seen, it is certainly possible to gain weight with a smaller stomach.
You'll want to take it slow. Rapid weight loss will only slow your metabolism and increase hunger. You've probably built up some resistance to hunger and satiation signals, so you are going to need to really be conscious not only of what you eat, but the volume. Don't make drastic changes all at once like going on a fad diet or adding in a ton of exercise. Those things almost always backfire.
I would recommend not focusing on how many calories you are eating, per se, but make changes in food choices little by little. Obviously you know the beer isn't helping with it's extra calories, so eliminating that would be a good thing. If you feel you've got any issues with addiction, you should reach out for some professional support in that area.
You don't have to do this right away, but over time eliminate foods with added sugar, artificial sweeteners, and highly processed foods (try to avoid anything with 10 or more ingredients). Choose lean protein and eat a wide variety of plants (not just "veggies" but herbs, nuts, seeds, fungus, etc...anything that grows).
If you like to cook but don't plan meals well, consider doing something like Hello Fresh or some other meal delivery service and choose the healthiest options. Explore vegetarian dishes and other things you wouldn't normally make for yourself that aren't high in simple carbs and fat. If you don't like to cook, look for fresh pre-made meals and not frozen processes stuff.
No matter what stage of the game you are, this battle is won or lost in the kitchen and in our minds. Both of those things have to be on point. But I'll stress again not to tackle everything all at once. Don't lose weight too fast or it will completely backfire. You don't have the hormonal benefits of the surgery any longer, so your weight loss is now entirely on your choices around food and mental health.
If you are snacking on things, stop bringing them into the house. Look for healthier options to snack, like raw veggies and hummus (or whatever) that you can use as a healthy "trigger" food to turn to. If you are hungry turn to that and fill up with that instead of chips or whatever. Slowly make changes to your choices.
You have exhibited strength before, so you have it in you. Be slow and deliberate.