You have many many years left on this earth. Do you want to spend them feeling this way about yourself, or do you want to give yourself a second chance and see how good you can be?
Put together a mental image in your mind of where you want to be and start taking the baby steps to get there. BABY steps. First, you need to start eating right. I say this for two reasons: 1, No amount of exercise is going to outrun a bad diet. 2, once you start to see positive changes in your body it will be like a snowball effect. You'll feel better about yourself, your confidence will rise, it will be easier to stick to it.
For me, I am a huge proponent of the ketogenic lifestyle. tl;dr - high fat, low carb. You might want to try the whole30 challenge to get things started.
Then you begin introducing exercise, again, with baby steps. Don't start crazy. If you're completely sedentary and never move: start walking. Get a dog and walk that sucker EVERY day!
After a few weeks and months of eating clean and moving every day, you will naturally start wanting more. You'll be able to explore gym routines with confidence and excitement. You might like weightlifting, or martial arts, boxing, rock climbing, crossfit, all of the above.
Once the snowball is moving, it's hard to stop. That is when you reach an inflection point in your life and it isn't a diet anymore: it's a lifestyle. You WANT to go outside. You WANT to go paddleboarding and hiking on vacation.
Baby steps. Do it right now, you can only get better!
I have a spinal condition so no heavy weights (nothing over 35kg) so lots of reps, pull-ups, calisthetics and eating a 1500 calorie a day diet (which sucked but I adapted remarkably quickly), I've kept the weight off for 18mths and I'm still 185.
It's a lot easier to maintain fitness than lose it and get it back.
Going from a 44" stretch back to a 32-34" (depending on brand) waist in jeans was a nice feeling but the main improvement was energy levels, once I binned the sugary energy drinks and got use to drinking a few cups of coffee sweetened with a tea spoon of honey my energy levels through the day leveled out and I started sleeping better as well (which given the spine stuff was a major win).
I'll stay in shape for as long as I possibly can do.
This is crazy fast, hope it doesn't bounce back during the next 3-5 years. 18 months in, you're well on your way, keep it up with the consistency!
I swore off pop/sugar/processed foods and lost 50+ pounds in a year (kept it off for a year too). Still more to go, but man what a difference.
Once you get the monkey off your back, the one that is always urging you to eat (for a variety of reasons - stress, food ads, etc...), it's easier to say no to food. When you've committed to not eating, you don't get to rationalize or fool yourself about some "snack" you're having. After 3 days, the physical hunger goes away, though the psychological desires have not completely faded.
You'll learn about how much time you devote to food satiation. Some of that mental clutter will fade away as you fast. I've gone for 3 days, but am looking to do 5 in the future. Our bodies are amazing and designed to survive these calorie droughts - our ancestors evolved this adaptive ability to sustain our life through hardship. Observe this hardship, rather than reacting to it. Keep observing and see what you find about the nature of your body and this life. You are now halfway through, might be time ask some tough questions.
Now I won't say it's easy. I know plenty of "failures", too. It's gotta be hard (if you read the linked story, it's a hardship I've never known). But plenty of others in this thread have good advice on where to start. I'm just here for moral support to tell that I've seen others do it at all ages, and it's never too late. Like in the story I linked, come back in a few years and give me something to cry about. :-)
I was quite athletic when I was 18-22, but stopped doing sports with any regularity around 23-25 and gradually degraded physically. Some day around 32 I woke up and felt so bad in my own body I decided to put an end to this over the next 7-10 years (since it was the time I took to dig myself into that hole I figured out it would take about the same time to reliably dig myself out of it), changed my diet (this is key!), and started running, which I hate, but basically the only thing I could manage to do. Went like 500m at a ridiculously slow pace (something like 10min/km) and started puking right on the sidewalk. This is when I really realized Things Were Definitively Not OK, and that all the parties and fun and eating and drinking we're not worth that.
End result seven years later, lost the 20kg I had in excess, ran 18km in 1h30, stopped running regularly but (now that I'm more solid) swapped for sports I enjoy much more, and I feel so good it's like I could tear walls apart with my bare hands! In many ways I'm in as good or better a shape than I ever was even in my 20s. Random sample of newly met strangers give me between 8-15 years less than my age, and "less than 30, for sure".
It's never too late. Pace yourself, one step at a time. Set realistic short term goals, yet look up to the stars because on the long run basically anything is achievable. Your mind will resist change, but it can be overcome. The only obstacle between current you and future you is yourself. Choose what you will become, at every moment, consistently.
Fuck if I Ollied down 3 stairs a month ago and I'm now super close to land a tre flip barely a year in, and if that guy[0] can still be at the top of his shape[1] at 51 after having his hip joint basically fuse and fix it through dedicated stretching and exercise (and end up giving a talk where he draws parallels between FOSS and skateboarding), then it tells something about consistency and dedication.
There's a lot in life outside of our control but we can control, to some degree, what we put in our bodies. I'm paying much more attention to that now (using MyFitnessPal) and going for a daily walk.
These are baby steps and I'm hoping to work myself back into shape to at least play some pick up soccer games, start new hobbies, and have clothes fit well and look nice again.
Count your calories on the app 'my fitness pall' so your not over eating and in 6 months you will be in waaaaaay better shape then you are right now.
Then go on youtube and research intermediate level advice.
:)