How should I deal with discouragement looking at others success? I'm a master CS student. I had so many troubles in my life. I didn't have proper schooling and were in difficult situations which led to me being not so good compared to my peers now at the graduate school. For example I had problems with math and so and when I got into my new graduate school everyone was almost far better than me. Then I started working day and nights to improve my skills and after a year of really hard work now I achieved almost their skills. However in that time my peers were also developing their skills and doing fancy projects and so on. Sometimes when I get to look at their success and projects I feel stressed and discouraged that I really still have way too long to achieve that. Or that I'm really putting so much work into myself because of the problems I went through but at the end I find myself still far. Whereas my peers are enjoying their lifes and at the same time achieving something. I know life is not fair nor I'm jealous, but sometimes I just feel sorry about myself that I work really hard but without much difference :(. This is also is leading so some self-confidence issue, that whenever I see one of my peers I get stressed and sometimes afraid to discuss a topic with them because I don't want to look bad not  knowing that easy stuff for them.

This is always leads to a voice in my head saying: oh if only a professor in MIT or Stanford sees how hard working you are, you might be there now. But of course I won't because I will always be far from the students there because of what I went through.

What to do to overcome this?
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!