1. Professional help is always good - whether you're in a good or sad place. Therapist fit is important so if the first time it doesn't work out, consider "shopping around" until you find somebody that a) You feel understands you b) You feel you can trust c) Is helping you in a way that you feel is helpful and productive. May take some time but most good things in life do.
2. Acknowledge, if/when you can, that a) What you know now is not what you knew then and b) There's absolutely positively no guarantee that you would be happier had you chosen a different path. In fact, I'd go as far as to say that statistically, knowing what you knew then, you made the rational decision - number of technology experts who regret going into or being forced into management, is vast. So don't beat up yourself for having taken decisions that you have. In fact, I'm not even certain that you can confidently brand them as "wrong" decision, based on situation and facts you knew then.
3. Look forward. Hardest but most important part. You are where you are; you cannot change the past; perhaps you can learn from it; where do you go from here, and how?
---
My big suggestion is to spend as much time as you can, with your therapist and loved ones and yourself, to work on your emotional intelligence / mindfulness. That's my personal big lesson in life - I spent 25 years focusing on technical, so I personally am in catchup mode for emotional / personal knowledge and maturity (which still puts me ahead of 90% of my colleagues who most likely will never pay attention to it on a conscious level or put real effort into it).
Because here's the catch - there's ZERO guarantee that, if you had your former colleague's job RIGHT NOW, you'd be as happy in that role as they are (or, to be blunt, necessarily as successful; hard work and intelligence are useful but not sole factors especially in management track). There's the external environment and then there's internal processing and reaction to that environment. You have to acknowledge that your happiness is a combination of external environment and your reaction to it and the weighing could be any which way. I have smart, intelligent, successful friends and family members who change jobs every 6-18 months are are ultimately never happy in any of them; and I have friends who are in a job I would positively hate, but are happy. So my suggestion is to consider working on both internal and external aspects.
(and incidentally, emotional intelligence and soft skills are on average way, way, WAY more important if you are considering management path than subject matter expertise.)
If, worst case, all you are is 2 years behind your colleagues - that's nothing, in the grand scheme of things. If management and specifically people management path is what you want to do, 2 years lost is meaningless (from some perspective, I myself am "20 years behind" those who went into management the day they graduated, versus my two decades of technical and architecture work; and you know what? I'm doing OK :).
But do consider also what is important to you and how you can obtain it. If mentoring people is what you love doing... well, most directors do very very little of it. Best architects and senior engineers, who may be IC's on paper, do tons of it. So take the time to truly grok what you want, rather than focusing on that one Jones in the fast lane who seems happy :).
Best of luck!