There are times when you're tired and times when you don't believe in yourself. That's when you have to stick it out and draw on the confidence that you have deep down beneath all the doubts and worries.
I have written a bunch of scripts that have not gotten produced, much more so early in my career than later.