I never understand this kind of thinking... reading the greats has always pushed me to do better. Try and use the best works as examples, as ways to excite and inspire you instead. That way you'll grow as a writer, and in the process gain confidence.
Yeah but sometimes you aren't reading the "greats" (people that everyone accepts as great, classics, etc.), but your contemporaries, and you face the sad truth that your contemporaries make things work while you can't. That's the real mind-crushing thing.
I know exactly where you come from. At times I feel like this about everything I could do in life. There are two ways to approach this. One way is to let this fuel your own efforts, to drive you towards catching up to, and then becoming better than your contemporaries. The other way is to completely let go of your need to compare your works to that of others, something that you most likely aren't doing that well in the first place. Your job is to write as well as you can, and improve on your craft as you go along. If you get too caught up in comparing yourself to your competition, you might end up giving up too early.. if anything the fact that you can recognize good writing means that you're going in the right direction.