Look, I can't tell if that funny bump on your neck is malignant and I can't tell if that 99.1F fever is worth going to a doctor about and I can't tell you if you should eat less gluten and I can't tell from a message board comment if you have a mental illness.
I don't care what you want to call it; "depression", "desperation", "determination". All I can tell you is that if you are convinced (not "worried"; we all worry sometimes) that you're a "loser" or that this is your "last chance" to do something meaningful, that's not normal. If you were a friend of mine, I'd be hassling you to find a professional you could trust to work that stuff out.
Hey, either way: best of luck to you. Your career will be fine.
I agree with tptacek (and others recommending CBT and ACT), examine the language you are using. The words you use may not spell "depression" but they are certainly in the vicinity that may lead you to it (I'm talking clinical depression). And this is all normal, but fixable. If you are not cognisant of the triggers that lead you to conclude on "yourself" as opposed to conclude on "stuff you did" (your works) you will continue to spiral into loser-mode and open the door marked "Depression". It'll only be a matter of time if you don't tackle this. And then, probably at 40, others will call it "mid-life" existential crisis. :-)
You are not your WORK (fuck pointers in C++)! Chances are that you're awesome at things you are refusing to acknowledge! Come here I'll give you a hug! (Then slap you!* ... because you're wasting time worrying about judging yourself instead of CREATING things and moving along!)
* Ok, I just slapped myself because I'm wasting time on HN! ;-P