In a paper published in the Journal of Experimental Social Psychology, Aaron Wichman and colleagues show that doubt can lead to increased self confidence, if the doubt is about doubts you already have. In other words, when you doubt your doubts you gain self-confidence.
According to the paper, when one doubts what they already doubt, the secondary doubt undermines the primary doubt. So instead of believing that one will fail at something, they believe that they might fail at something. (“Failure will happen” is the primary doubt, belief that the primary doubt may not be true is secondary doubt.)
Wichman completed two studies from a pool of 37 participants who were measured for chronic uncertainty. Read the about the studies and the results here.