If you feel like a failure and that the damage is done: I'd say you are damn near rock bottom. If you're at that point... there is truly no way to go but up.
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!