How should one handle peers, competition and other social pressure while studying theoretical CS/Maths?
First, slow != dumb (your words). In fact, these are two completely different cognitive processes. WISC, a widely used IQ test, measures IQ as a composite of four scores. Two of them are working memory and processing speed, which is your general ability to quickly solve problems. Another two scores are Verbal Comprehension index and Perceptual Reasoning Index, which measure loosely your problem solving skills and pattern recognition. Many score high on one, and not the other. 

Some problems are hard, and it is very difficult to learn how to solve them. But, after solving (or understanding solutions to) many, many of them, you develop the feel how to approach a new problem. If you are passionate about the field, so much so that you have enough discipline to practice and work hard day after day, the results will come.  

Last, take care of yourself. And you might want to read up on imposter syndrome, https://counseling.caltech.edu/general/InfoandResources/Impostor . A very common occurrence in academia, it is a mindset where people downplay their own successes, focus only on their struggle, fail to see others' struggles. For example, just from your post: you are more educated that the rest of your family, you have been admitted to a top school, are eager to tackle some of the most difficult problems, and have a very heavy class load. These are your successes. Give yourself credit for it. Focus on the struggle: you tend to call yourself names, and over-generalize several setbacks (bad grades), while seeing others in glorified way. A more constructive would be to look for a solution for your current struggle that takes an advantage of your strengths: maybe dropping a class, if you can, to give yourself more in-depth studying time.