In development it seems that the paradox "the more you know, the more you know you don't know" holds true. (see this simple non-development commentary: http://lennymaysay.wordpress.com/2008/04/22/the-more-you-learn-the-more-you-realize-how-little-you-know/)
If you are a thoughtful, honest person, you will need to accept this fact and learn to deal with it.
Confidence, in the sense implied by the question, is a very personal thing that really has nothing to do with a particular skill set or methodology.
On a more shallow note, the sentiment described in http://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-programmer/ (section: You radically overestimate the average skill of the competition because of the crowd you hang around with) has always helped me.
I would suggest that you learn to be more confident in the work that you have done as opposed to building confidence in your skills as a whole. The single best way to do this is to write repeatable tests for all of your code. It will work wonders on your psyche.