My ex-boss used to say, "Stick to the process, be flexible about the outcome."
If things go south, just go back and review the process.
And when it comes to motivation, he'd always say, "Focus on those little signs of progress, especially in how we're doing things, not just what we're getting."
It's like keeping your eyes on the journey, not just the destination.
And as for quitting, he said, "If quitting opens up more opportunities, then quit right away."
Haha, it's too long for a comment now. Maybe I'll write a post about it in the future. :D