I've battled with feelings of defeat all my life primarily because I place too high of expectations on myself.
In my high school years, I've lost weeks of sleep over a C grade on my Biology exam.
As an entry-level engineer, I beat myself up when I couldn't solve a problem within a timeframe I gave myself.
Thinking back, I wasted so much time feeling defeated. Those are seconds and hours I can't take back.
Today, I spend a fraction of the time I used to feeling defeat. That doesn't mean downtime doesn't happen. It happens, but nowadays, I am 'up' 100X more than before.
Here's how I keep myself motivated even when I feel defeated:
First, I recognize that feeling defeated is a choice. Like anger, you choose to feel defeated. And if you don't choose to feel defeated? You don't.
The feelings go away instantly.
The problem with us sometimes is that feeling defeated actually makes us feel comforted - internalizing the pain allows for self-pity to come in, a feeling that we actually enjoy.
But like alcohol, it's good at first, and then it feels really, really bad.
So the first thing you need to do is let it go. Let all your feelings of defeat go.
Trust me, you can. But you need to allow yourself to do that. Don't cling on to self-pity.
This will make you a stronger person in the future.
The beauty of letting go of these feelings of defeat is that you don't need to look for motivation after that.
When you let go of the feelings of defeat, the space you used to reserve for it becomes vacant. The feelings of motivation will naturally grow from there.