I noticed a similar tendency in myself a while back - whenever I saw somebody who was both succesful and young, I'd do a mental calculus in my head to see if I could "catch up", and I'd get bummed if I couldn't (similar to you comparing yourself to a you that had more advantages).
I adopted a similar mindset of "wow, if they can do it that fast, look how much time I have to become successful" - essentially seeing that yes, I could get much further faster if I used their techniques.
Cross-posted
Nothing weighty or profound today, but I noticed a failure mode in myself which other people might plausibly suffer from so I thought I'd share it.
Basically, I noticed that sometimes when I discovered a more effective way of doing something -- say, going from conventional flashcards to Anki -- I found myself getting discouraged.
I realized that it was because each time I found such a technique, I automatically compared my current self to a version of me that had had access to the technique the whole time. Realizing that I wasn't as far along as I could've been resulted in a net loss of motivation.
Now, I deliberately compare two future versions of myself, one armed with the technique I just discovered and one without. Seeing how much farther along I will be results in a net gain of motivation.
A variant of this exercise is taking any handicap you might have and wildly exaggerating it. I suffer from mild Carpal Tunnel (or something masquerading as CT) which makes progress in programming slow. When I feel down about this fact I imagine how hard programming would be without hands.
Sometimes I go as far as to plan out what I might do if I woke up tomorrow with a burning desire to program and nothing past my wrists. Well, I'd probably figure out a way to code by voice and then practice mnemonics because I wouldn't be able to write anything down. Since these solutions exist I can implement one or both of them the moment my carpal tunnel gets bad enough.
With this realization comes a boost in motivation knowing I can go a different direction if required.