Positive results in spite of negative thoughts?

In doing this months homework, I’ve seen how often my thoughts are anticipating a negative outcome, especially in regard to my own performance. And I remember always thinking this way. YET, I’m often surprised to find out that in spite of planning for failure, things have worked out and I’ve done pretty good. What is going on here? Shouldn’t I be creating more negative results from all this worry and doubt? It’s almost like I tell the story that I’m going to fail to cover my own ass in case I do, but at a deeper level there is a sense of perfection and certainty that I’m afraid to voice, even to myself. I don’t like having this secret feeling that I am special and that’s what the certainty feels like. It seems narcissistic and superior. Any thoughts?