What everyone else said about depression and also the fact that you are concerned about the quality of the mothering you might provide tells me that you'd be a good one. Shitty parents don't question whether they are shitty parents. Good parents do.
I got preggo at 37 unexpectedly. Everything you said ran through my head but I'd made the decision 4 weeks preggo that I was all in. Couldn't say the same for the dad. He bailed. I did mourn my pre-baby life. I had friends and I still do. They are a lovely mix of my non-parent friends that I've had forever who have my back and new, mom-friends, too. My pre-baby friendships are stronger. They knew me before, they were with me during and have still been my friends even though they don't have kids themselves, OR, their kids are grown and gone.
Yes, your life will shift. That first year is gonna be a bitch and brilliant at the same time. I kinda wish for those baby days. Now I have an emo pre-teen and a 6 year old budding fashion designer/free climber in the house.
My first did not destroy my body but I was fit when I got pregnant and then after delivery, through some circumstances, I ended up being able to lift weights and jog regularly that I was back to 2+ pounds from pre-baby weight in 8 months. My second did some damage but I was 44 y/o and peri-menopause was already having her way. After 6 years, I was able to do something about it.
I love them both. First one not planned but loved beyond belief, second one planned and same. I did not have PPD but I did have a time where I grieved the way he came into the world. I wanted to bring him in but alas my stupid tiny hips wouldn't cooperate and a doc had to extricate him. Same with the second. I can gestate and breastfeed, cannot extrude.
Seek help for your awareness of your thoughts. You still have options.