Kristin Cashore, author of Graceling and Fire, has a nice post up about keeping the faith while writing, even if you feel your manuscript is "a total mess".
She emphasizes that, yeah, your book might fail, but it definitely will fail if you quit writing it. She talks about faith and doubt, and how you can have both at the same time - give yourself permission to believe even as you have your doubts, and don't fail because you didn't work hard enough.
Only, she says it all so very much better. See her post here.
And talking about writing, I almost seem to jinx myself if I talk about my writing here. I'll throw caution to the wind, though, and say that I am indeed writing, and the story is coming along nicely so far.