At what point does one simply give up? When does one say to oneself "I can't write, and I'm wasting my life doing so?"
Publication may be nice but it's not the only reward.
The very act of writing is its own reward. It teaches you (if you pay attention) how to see the world through different eyes; how to wield language skilfully; how to organize a persuasive presentation.
You recognize that writing is a creative art and brings you joy.
You recognize that doing something difficult over and over again, and trying your utmost to improve is a worthy endeavor even if you fall short of your goal.
You recognize that these moments of despair or frustration or fear are part of the process, and will make the achievement of your goal just that much sweeter.