When asked for writing advice, bum glue is the first thing I suggest. I've been there. I get it. I know how easy it is to get distracted, how hard to stay focused, how quickly second-guessing yourself can morph into giving up entirely on what might have been a perfectly good book.
For some, this seems to happen around page fifty (I know a few writers with 4-5 projects on the go, each with approx 50 pages written) while others make it mid-way through the creation of their first draft (around 150-200 pages) before they feel that dreaded.... phfffft!
Like that, gone goes your enthusiasm, your confidence, your creative spark. Recognize this up-down rollercoaster ride? Been there too? If you've ever tried to write a novel, I'm sure you have. It's nothing new. You're not the only one afflicted with this problem and that alone is good news.
Keep in mind, the work, your best work, gets done in the rewriting. Always. Structural issues, character development, dialogue that sings, setting, pacing, dramatic tension, creation of sub-plots that strengthen the main plot -- none of these gets nailed in a first draft.
If I've learned anything over the years it's that I never share the first draft with anyone. Or the second. Matter of fact, these days no one reads it but my agent (who won't see it until it's a strong 3rd draft) and possibly 1 or 2 readers I've cultivated relationships with who can see the big picture and offer advice the way an editor might.
So sit down. Write. And do not move from your chair unless your house is burning down. Even if you write garbage for two hours, that's okay. You can always rewrite it, but at least you're moving your project forward. Here's the other side of the coin: if you allow distraction or procrastination or your penchant for obsessing over that unattainable concept of perfection stop you from writing, you may never get published at all. And wouldn't that be a bummer?!
Bum glue. Don't have any? Get some!