I just returned from a writer's conference, and, although it was focused on writing for children, a lot of what was said can apply directly to writing of any kind.
One of the first things I heard was "Writing is an act of faith." Every time I hear that statement, I feel like I've been kicked in the gut. But then the speaker said "You gotta believe. You gotta believe in yourself and your work, because, in the end, that's the only thing that will sustain you."
But how do you do that in this scary world called publishing? How do you keep believing in yourself?
The only way I know to do it is to keep learning, to keep trying, to keep on keeping on.
And never, ever give up.