There's no lesson. It's hard. Your brain will search for the silver bullet to skip the boring self-improvement work and feel good NOW. It'll likely detach your current self from your past self (I was bad, I discovered this, now I'm great, exceptional and heroic again). Then you'll again avoid the boring day-to-day work (becaue you feel exceptional again) and fail again.
Everything you know is material for your brain to make excuses and rationalizations. So no lessons work.
What works is retraining the part of the brain that distorts the reality and directs all your thoughts towards these patterns.
It's a lot like debugging. There's a callback in your brain that is harmful. It triggers every time you have to sacrifice some future potential for uncertain reality. It is subconscious. Put a breakpoint in that callback. Try to notice every time it triggers. At first just notice it, notice what it urges you to do.
When you have it nailed down - try to change it. At that point you'll realize the urge and where it comes from. Then it's a matter to making the decision and committing to sth, no matter what. It doesn't only have to be big things, it can be small things unrelated to work. It's the same "code". If you do it every time - you'll retrain it eventually.
At least that's the theory, I'm not there yet.
> Put a breakpoint in that callback. Try to notice every time it triggers. At first just notice it, notice what it urges you to do.
Damn I love this advice phrased like this.
Physical exercise does wonders for this. The results you achieve are a 100% determined by the time and effort you put in. It's hard to start, as its asking for more self-improvement, but if you can get this one thing, the rest fall into place.