Some people ask me if I get depressed, if I lose confidence in what I am and whether I get upset with those terrible people. Well, I do. for a moment. But I am really too busy, I don’t have time to be depressed, lose my confidence, or think ill of anybody, for long. I just don’t have the time.
-- Yoko Ono, from a speech called "A Quiet Revolution" given at Oxford University on March 10, 2010
(You can read the whole speech here.)
I know there are a lot of people out there who do get depressed and lose their confidence. I see this discussed fairly often on writer blogs, though of course lack of self-confidence isn't restricted to writers. But I agree with Yoko. I work full time and have a toddler; I'm always busy, sometimes busier than I'd like to be. There's lots that needs to be done at work and at home, so I just do it. When you're busy mentally juggling half a dozen things, you don't have time for negative thinking. But negative thinking can keep you from accomplishing things -- if you let it.
Another quote I like is from drummer Mark Schulman: “There are always going to be better drummers out there, but that doesn’t mean I’ve ever doubted my ability to do this.”
The same applies to writing. Don't worry about what other writers are doing; focus on making your work the best it can be!