How should I deal with discouragement looking at others success?
I will apologize in advance, because this answer won't give you what you are probably looking for; but it might give some perspective so I will reply anyways hoping that helps somewhat.
First off, know this: you are not alone! It's actually pretty common to look at your peers (at the office and elsewhere worldwide) and feel shitty about the "insignificance" of your accomplishments compared to those of others. To further strengthen the point, I can say that I am battling with this every single day for instance, despite what I hear from others about the quality or importance of my work when I look around and see what others achieve I feel depressed...
Secondly it's also good to try and remember that life isn't a competition. Well, some aspects of life are competitive, for sure, but you cannot go about living your day competing with others in every single aspect of your life. This is a simple but a very powerful insight, also very hard to digest it properly and take it to heart.
Think of all the aspects your life, from research to parking your car, from buying groceries to whatever sport you enjoy the most... I can guarantee you that there will be several (if not more) people within your immediate surrounding that will be "better" than you in each one and single aspect, if you isolate them one at a time. But I can also assure you that they won't be the same people if you consider different aspects. Overall, you are the person you are and constantly comparing yourself to others in single aspects (and focusing on your shortcomings) will only drive you towards unhappiness.
So does that mean you should just relax and go with the flow? Absolutely not! You have to play catch up, if you can identify your shortcomings in particular fields (like maths, or programming experience). It'll be frustration, it'll be long hours, it'll be effort... Try to focus on setting goals for yourself when you are in catch-up phase.
I strongly recommend checking out S.M.A.R.T goals concept which helps in getting things done and bagging that sweet feeling of accomplishment, little by little.
Hope this answer helps to some extent and it all works out in the end!
Although, it is customary to give pep talk, the truth is that life is unfair. Your friends might get all the girls of your dreams without even trying (I assume you are a guy), your siblings might be more successful than what you will ever be and even your parents might be more educated than you. You can always blame this on your "hard" life and naively believe that if you actually put another 10% of effort you might minimize the gap between your achievements and theirs. The problem is, that sometimes people around you are more smart, more beautiful and even more hard working. You have to accept this as a fact of life. As Clint Eastwood said "A Man's Got to Know his Limitations". What you can do is work within those limitations and stretch them to your absolute best. But even then, success is not linear and sometimes extraordinary smart, hard working people fall flat on their faces.
So, although you should look to people around you for inspiration, trying to replicate their success is a dead-end. There will be always be someone more adequate, smarter, richer or luckier. So, instead focus on what you WANT TO DO instead on what you want to get. Do the best you can but mainly enjoy the process as well. Otherwise your dreams are toxic and lead you nowhere.
Sounds like you're engaged in a lot of upward social comparison, which is bound to make you feel somewhat inadequate if you're judging yourself by the different standards of achievement that may apply to them for all the reasons you mention. Upward social comparison might be a good way to form goals, but it's not a good way to judge your progress so far. Even if you'd had the same environmental advantages as some of the people you seem to be focusing on, you'd still both be working with different personalities and aptitudes, and probably different tasks too. Too many factors differentiate individuals' performance to take observations of your peers quite so seriously as reflections on yourself.
The ideal approach would be to judge your progress by your standards. You've known yourself long enough to have some sense of whether you're growing and performing at your usual rate. If you're improving steadily in these regards, I'd say that's plenty of cause for a decent amount of self-esteem. If you find yourself doing worse than usual, consider what's holding you back, and consider whether you've defined your goals realistically. I'm not saying you can't be responsible for underperforming—you should be able and willing to see fault in yourself—but you shouldn't blame yourself immediately without considering other factors that might be affecting you. This is all part of the broader matter of managing your expectations, and separating them from your hopes and aspirations.
I probably wouldn't recommend relying too heavily on downward social comparison, but it is also an option if you need to calibrate your frame of reference with others in general, and it sounds like you might. You sound very focused on what you have had to overcome, not the fact that you've overcome it, and focused on what others have done with advantages you didn't have, rather than what others have done with the same disadvantages you had. How many of your peers had problems like yours in the past? How many people do you know with similar backgrounds who haven't made it to grad school?
Be careful not to get caught up in depressive cycles of ruminative thought as well. You sound stressed for at least two reasons that should "cancel each other out" in some sense:
- You had a hard life...
- But you still made it to grad school!
- You have trouble keeping up with people who haven't suffered the same disadvantages...
- But you know you've had to deal with a lot of unusual problems outside of school!
That you are still in the same program as those people who had it easier should help you feel better about your life, because it's only held you back somewhat. That you have been held back by your life's circumstances somewhat should help you feel better about being behind somewhat. Nonetheless, if you focus on each source of stress separately instead of focusing on these connections, each will make you feel bad independently, and each will remind you of the other reason to feel bad. Focus on the reasons you are where you are, not just where you are, and focus on what you can do about it, not just how you feel about it (see also problem-focused and emotion-focused coping)...and never forget how far you've come already.