OP– I'm about your age, and I haven't completely solved this problem for myself either, but I've thought about it really hard for a really long time. Let me address your issues / statements / concerns one by one.
> I find it very hard to sit down and work on a project without an external motivator, and on many nights I end up vegging out in front of the TV or aimlessly clicking around on the internet.
This is a classic environment type problem. If you're committed to creating great work, then you have to carve out time for yourself. This means having a specific routine. Talk to people who train in sports and they'll tell you– they don't rely on any particular sort of motivation (external or internal). Rather, they have a routine where everyday at 6am they lace up their shoes and go for their run, like it or not. Read Stephen Pressfield's The War Of Art– he talks about Going Pro. You don't wait for motivation. You do the work every day. Sometimes inspiration will come, sometimes it won't.
> Every day, I read an article by some hot-shot young dev who has a handful of fancy projects behind his belt
These folks are exceptions. They're exeptionally good and they're exceptionally lucky. You'd be better off not reading any articles at all.
> It's a constant, irrepressible gnawing in my chest.
I experience this intermittently. IMHO, I experience it when I haven't been doing work. The solution is literally to sit down and do work. The gnawing is a reminder that you are working, not doing.
> even though I still end up on HN half the time
Turn off the Internet?
> I have so many great ideas, and knowing that the main obstacle between them and me is only myself keeps me in an endless state of panic
This, together with your vegging out / aimless clicking, suggests to me that you're framing the problem too broadly.
The main obstacle between you and your goals might be you, but it also might be, you know. One quant of work, followed by another, and another. Baby steps, man. Do one thing at a time.
> I've resigned to the fact that I've procrastinated away a decade of valuable time, and it just endlessly haunts me
This is the venomous, compounding problem about obsessing about sunk costs. Listen– life isn't a linear thing. Some of these folks younger than you will get into car accidents and die. Others will get distracted, end up in horrible marriages, all sorts of nasty things will happen. Life doesn't progress nearly as linearly as you think.
What you need to do is really sit down and go, "Yes. I have burnt a decade. I have some unknown amount of time in front of me. I have today." What are you going to do with today? Why do you want to spend today agonizing about yesterday?