You don't think you did well during your PhD, but you stuck with it anyways. That sounds like a lot of PhD students. But, it also sounds like students that stuck with something, b/c their parents were back-seat driving their futures.
As others have said, your self-esteem issues stem from something. Something makes you feel inadequate all the time, and makes you compare yourself to others all the time.
Usually, that starts from overbearing parents constantly comparing you to other kids, chastising you for not being as good as some top-tier, stellar performer in your same grade or field, etc.
My dad did that to me my whole life. I was expected to get good grades. When I got them, I didn't get a "good job!" or anything. But, if I got bad grades, I got punished. As I got older, my dad would constantly compare me and my siblings against each other and to other kids his coworkers had. "So-n-so's kid is doing XYZ." (to insinuate it's better then what I was planning on doing, or was doing).
Even when I was an adult, my dad was trying to back-seat drive my career with "advice" that wasn't so much him trying to do what was best for me, but what was best for my career. He never took me, as a person, into consideration when giving advice.
What I realized over time (chatting with my dad extensively) was that he made decisions in his career... he gave up moving up the ladder or managerial positions, because he decided to start a family. He took a back-seat position at his job where he kept his head down and kept his mouth shut so he could keep earning an income and not rock the boat while supporting his family. He made one major career shift up the ladder to get more money, and in retrospect it was an awful decision that uprooted the family and set in motion events that pretty much tore the family apart.
What I realized as I got older was that he was trying to coach me to have the career he wished he could have; he was trying to guide his dream job vicariously through me.
He would push it in ways by either telling me exactly things he thought I should do, or package it as "I was chatting with kids at the gym and giving them advice, and this one kids doing XYZ" (again, to insinuate this "one kid" was doing something better then I was).
I got sick of it.
So, I stopped chatting with him about work, school, etc. When he'd ask or press, I simply told him that I was only going to speak with him like a member of the family, not someone I was seeking career counseling from.
I eventually had a blow-up with him, because I was tired of him trying to back-seat drive my life while I was watching his life implode around him with issues he wasn't staying on top of during a situation that basically forced me to take control of his responsibilities when he ended up in the hospital.
What I learned was ... just ignore him.
In 20 years time, my dad won't be around any more. But, god-willing.. I will.
In 20 years time, will I be happy if I had followed my dad's advice and done this and that? No. I'd be miserable, because he was pushing me to go in directions that were making me miserable.
So, why bother listening to him? Why bother trying to please him?
In 20 years time I can follow his advice and be miserable while he's dead, or I can ignore it and be happy while he's also dead.
Ultimately, I have to figure out what makes me happy, though.
But, when you have someone constantly telling you that you're not doing good enough, you need to do better, you're not doing as well as so-n-so over there, you should be heading in a certain direction, you need to do it all before a certain BS time limit... you know what, you eventually turn into a hot mess that thinks very little of yourself b/c you constantly have a devil on your shoulder that never thinks what you're doing is good enough.
Tell that person (or those people) to go screw off.
Since you're international.. and you're in a STEM field.. and you went through a PhD even though it sounds like you didn't really want to .. I'm going to assume you're Indian.
You need to have a moment of clarity where you decide to be your own person and stop having your family tell you what you need to do and where you need to go in life.
That can be hard if your family is paying the bills.
But, I may be making assumptions, but your story sounds almost identical to a ton of other folks I rubbed elbows with in college... all of them Indian. They were taking STEM when really they wanted to do liberal arts or whatever they were passionate about. Their family pushed them into an "lucrative career", b/c it's all about the money and status with them.
I had a couple of Indian folks tell me they had a massive weight lifted off their shoulders when they told their family to stuff themselves. They were dating people locally, and one was wanting to marry the girl he was dating. One guy dropped his STEM and went into art which is what he really wanted to do (and he was an AMAZING artist).
Ultimately, you have to figure out what makes you happy, and stop listening to folks constantly running you down and telling you you're not good enough.
I rented a room from a gay couple, and one of the guys had a degree in aeronautic engineering. You know what he did for a living? He was the director of a high school band. His parents pushed him to do engineering, b/c he was in the closet and just kept his nose down and did what they said. When he finally got older, he got tired of them, and came out of the closet and pursued what really made him happy: music.
People have to have that moment.
So, you're asking how you'll survive over here? I think you really need to ask yourself what will make you happy. And, you need to start ignoring folks that are running you down.
With a PhD in Chemistry, you don't have to be a great programmer. There are companies that will hire you to figure out some chemistry, and team you up with Comp Sci or Info Sys folks that will do all the coding and stuff for reports, data science, etc.
If you don't like what you have a PhD in, then go figure out what you do like. Maybe you like working on motorcycles or scuba diving or whatever.. find a way to make a career out of it.
It's better to live a modest life that makes you happy, even at the expense of others, then to be rich and f'ing miserable b/c you decided to make everyone else happy.. usually folks that won't be alive in 20 years time.. which just leaves you miserable while they're dead.