TL;DR: You can't control feelings. Shift the focus to yourself and what you can control which is your attention.
Treat feelings as signals, not drivers. You are better off just accepting their existence as they will not go away until you find and fix the source. In your situation, I'm guessing the the most essential source might be the fact that you dwell on comparing yourself to others.
Think of it this way: if you changed your environment and surrounded yourself with, say, data analysts (no offense to analysts, it's just a different world) - would you feel more empowered to pursue your goals? At least now you have the opportunity to learn from people you consider smarter than you what might prove more beneficial for you in the future.
The point is: comparing yourself to others provides no value. It's a silly counter-productive mechanism that distracts rather than motivates. Somewhere, there always be a person that's a few steps ahead of you.
Achievements vary from perspective. I couldn't care less about math medalists, to be honest. But this is a good thing actually, if you adjust your perspective to focus on making you achieve the goal, you won't care about other peoples' achievements, unless you are happy for them which I consider a healthy counter-mechanism. All you need to do is to keep the daily grind going and do what you need to do regardless of emotions. Motivation will probably appear sooner than you expect.
As a side-note, a good practice is to list all the achievements of the last year (not generally area-specific, it might be even something like going on a holiday) and remind them to yourself when you start overthinking the things you haven't done. It has a better chance of putting you in a good mood than letting yourself down.
Disclaimer: This is a general advice that's based on my past experiences that are not academia specific, but are based on self-motivation towards my personal goals.