Get some perspective; you’re an insignificant speck of dust, on a tiny dot floating in a void of infinite nothingness, is it really that important if you’re a good developer or not? Probably not. Once that pressure is off you can get down to work.
Get objective; I think you probably already know the answer to your problem, or at least know the steps to get you to that answer. I like to ask myself: ‘if a close friend came to me with this, what advice would I give them?’. In my experience it’s so much easier to tell other people what to do than yourself, this helps to break through all the BS stories you tell yourself.
Is it valid criticism? Is this as simple as; the manager just tells all the developers they’re slow in a misguided attempt to increase productivity? Can you see the other developers code? As is often the case, speed is often not a good metric, in coding it generally means smelly code that is a disaster down the track for maintenance or trying to add new features. Are you developing great code?
Do the work; are you just blindly copying from SO or blogs or wherever and not taking the time to understand the code you’re writing? Perhaps what you need to do is actually really slow down and do it properly. Take the speed hit upfront, so down the track your investment in learning can make you a better (and yes, even quicker) developer down the track. Are you spending an hour a day outside of your regular work to learn and improve your skills? Are you repeatedly returning to the fundamentals? Hammering them into your head until it’s second nature. Are you honing the craft you’re devoting a significant portion of your life to?
Are you willing to do the work? Anything worthwhile takes sacrifice and perseverance. Are you willing to give up Youtube, Netflix, Xbox, or the worse; browsing Hackernews, to master your craft? Do you need to get rid of your iPhone? Seriously and honestly ask yourself if this device helps you move towards achieving your goals or just gets in the way.
Of course this is all advice to myself, if it’s helpful you then that’s a bonus!