I don't believe in wasted writing. Connecting with other writers has taught me that we all suffer from the same affliction...major self-doubt when putting words on the page. If you let it, it can keep you from writing. The best thing to do, is push through and put words on the page.
When I write, there are times when I'm in the middle of a scene that I know will be scrapped later but I follow through. Why? Often the writing helps with character and/or story exploration, especially since I'm a pantser (a person who doesn't pre-plot before putting words on the page). Sometimes I cut the scene during revisions and put it in my folder of deleted/original scenes only to find that I can use it later, usually in an altered form. Or sometimes, it's just a discarded scene. I never think I wasted my time writing that scene. It could have showed me something about the character or story, or I may have only discovered something that wasn't going to work.
Remember, things don't have to be perfect the first time around. That is one of the hardest things about writing, wanting to get the story right in your first draft. It won't happen. I leave myself many comments during my first drafts stating that I don't like the word choice or the sentence is really bad or that I need to make the scene better. This is what the joys of revision are for. At least have something down.
There comes a time during the writing process where I feel like I'm spinning my wheels and not getting anywhere with the story. I often reach out to the #amwriting thread on twitter. Usually someone else is experiencing the same issue or I see a post reminding me to keep going. Often one of my followers tweets me some encouraging words, which really means a lot. A critique partner (CP) comes in handy during these times too. I have a wonderful CP, who is now a friend, that is willing to bounce ideas around with me. As with revisions, often that other perspective can help unlock ideas or help me see something I missed.
Despite the self-doubt that I experience while writing, when I go back later to reread the passages that I thought were so horrible they should be burned on sight, most are workable. By pushing through, I've given myself a starting point. I'm not saying they are ready to be seen by other people, far from it, but I can mold them into something that is worth sharing.
I used this analogy in another blog post but, for me, it helps keep the process in perspective. I view writing like sculpting. I have a giant piece of stone that I want to form into something. To get that sculpture, I need words on the page, a first draft. Once I have that, I can chip away to turn it into something I'm happy with and hopefully proud of.