Furthermore, when I look at my peers who got into top programs either in engineering or in physics, I see that they are much more productive than I am. Whether this is because they are smarter/more creative/more motivated/more hardworking than I am matters little. Honestly, I am suffering from a deep inferiority complex due to this coupled with a few more things in my personal life, but that is a separate issue that is not really relevant here.
This is absolutely relevant to finishing anything you start. It's also better known as "imposter syndrome".
To put it simply, imposter syndrome is the experience of feeling like a phony—you feel as though at any moment you are going to be found out as a fraud—like you don't belong where you are, and you only got there through dumb luck. It can affect anyone no matter their social status, work background, skill level, or degree of expertise.
https://www.verywellmind.com/imposter-syndrome-and-social-anxiety-disorder-4156469
If you don't have the drive to finish something because you are (falsely) comparing yourself to others you see as better than you, then it doesn't really matter what logic, statistics, job availability, or anything else say. Without that drive, you simply won't finish or, if you do finish, you'll likely resent finishing. The flip side is that if you don't finish your degree, you'll likely regret that decision, but your imposter syndrome will convince you that it is "proper", since "you wouldn't have been any good at it anyway".
Of course, that "logic" is all a load of bull.
Some of the common signs of imposter syndrome include:
- An inability to realistically assess your competence and skills
- Attributing your success to external factors
- Berating your performance
- Fear that you won't live up to expectations
- Overachieving
- Sabotaging your own success
- Self-doubt
- Setting very challenging goals
and feeling disappointed when you fall short
That list comes from the same article I listed above. I see a lot of that in your question. The fact is that you are doing better than you think you are. The simple fact that you got into a PhD program shows that you have more drive and intelligence than most people.
You are simply having a moment (or more) of self-doubt and probably some burn-out. This is natural, especially when people push themselves as hard as you are for as long as you likely have been.
Often, people with imposter syndrome will try to overcorrect by boasting about how well they are doing in public, then feel like crud in private. So the people you see as "smarter/more creative/more motivated/more hardworking" are likely also suffering the same problem you are.
There's also the opposite of imposter syndrome, which is the Dunning-Kruger effect, which says that people will over estimate their own importance, intelligence, or smarts in a topic when they are actually ignorant in the field. Those people who boast about how good they are might not actually be any good at all. This effect also states that people who are very informed about a subject will know better how much they don't know, so will underestimate their skills.
The bright side is that you can recover from imposter syndrome and the Dunning-Kruger effect to build your self-image back up to where it needs to be. There are a lot of online resources as well as going to therapy, or simply talking to your friends and colleagues about it. Likely, they'll remind you about how well you are doing, even when you get negative feedback from advisors, professors, and whomever else is in a authoritative role over you. Even talking to some of them may help you find out that they are simply trying to push you to do better, since they may believe you can do better. They may just be pushing too hard or in the wrong way without realizing it.
My question is, what exactly is the point of continuing the program?
Why did you get into the program in the first place? Did you look at employment opportunities beforehand? I'm sure you did. I'm sure you got into it because you enjoy the subject. Not many people get into a PhD program just because they were told to. You just need to find those reasons again and they'll be your answer.
Also, you will want to finish your program to avoid the regret of not finishing it and the resentment of paying all money & spending all that time to waste it by not finishing. I have regret and resentment about not finishing my bachelors degree. I can't imagine how bad it would be to not finish a higher degree, so do yourself a favor and avoid that problem.
All of this stress, imposter syndrome, Dunning-Kruger effect, burn out, and negativity can lead to depression, and depression can lead to worsening depression. You need to get help with this. Society seems to make people think they need to handle everything without help, yet a common phrase is that "it takes a village". Generally, this is referred to when talking about raising a child, but really it's about anything. People help each other do many things. Farmers help others when they are sick and can't plant or harvest their fields. Neighbors help with performing house repairs or loaning tools, or simply watching their house when they are away.
We've lost a lot of that sharing responsibility in the past few decades, but there are plenty of people who still volunteer. What I'm trying to say is that we were never intended to "handle everything" by ourselves. This is why we live in communities, so we can share responsibilities as well as resources. We need the help of others to do our jobs, live our lives, or do anything, really. We shouldn't be pressured to deal with mental health issues on our own, either.
So yes, talk to you friends, colleagues, family, a therapist, get into group therapy, find a hobby, something to help you deal with the stress and insecurities of your life. They can help show you that you are doing better than you have convinced yourself you are. They will help you remember why you are doing what you are doing.
The people you love and respect, who love and respect you, will help you answer your questions far better than random anonymous people online are going to.