I constantly have self doubts, something in between Imposter Syndrome and OCD. I need to make sure I did the right thing, and even when I'm done what I had to, the self doubt kicks in, the OCD makes me look over just once to make sure. I'd say, this feeling is the exact opposite of walking away from what you've destroyed behind yourself like in the movies.
In the early days of my career I thought this was what is keeping myself from achieving goals but later I realized that my self doubt kept me from making a lot of mistakes that would cost a fixing. It's ok to have self doubts, it's ok to think you're not competent enough, or fear that you'll fail in general. I believe that's what actually makes you a good developer.