1st Off .... STOP beating yourself up for taking a chance on something that didn't pan out. RULE OF LIFE: If you don't try, you will never succeed, so don't every stop trying and always remind yourself of that.
I'm in my 50's now, and I'm starting over also. I got a BS in CS many years ago, started a career right out of college and within a year was derailed by the software industry to the point that I settled for teaching application software as a career path. My real interest was in software development, which I dabbled in over the years, but not enough to claim any real experience. Back then, women were extremely unwanted in the computing industry and many of us were "persuaded" into less technical positions. Unfortunate for sure, but it was what it was ... crappy! (moving on ...)
I never gave up the desire to write software, even though life went down many roads I did not expect. Finally my window of opportunity came up, and I'm now back in school and doing well. I'm certainly not there yet, but I'm getting closer to landing that 1st job! I'm competing with all the 20-30 year olds out there who 'fit in' better, so I have to shine in other ways. I have to be creative with setting myself apart, so I'm working as an intern and gaining experience through many different avenues both online and in person. I have a BS in CS already, but my experience doesn't show it so it's not worth much.
I'm trying to navigate this path also, while I slowly pursuing an MS in CS, and build my portfolio of projects more and more ... that's another area where FCC should help significantly!
I understand how you feel like your situation is no different than when you were 18 ... me too! We both need to remember that we have maturity (hopefully) on our side. Yep, that does count for something now and again, so don't forget to focus on your strengths. Every software developer out there started somewhere, they didn't just show to their 1st day on the job "all knowing". They all had mentors, and people around them who supported their learning curve as they gained experience. The same will happen for us, and I can't wait!!!!
Coming up with the fastest algorithm, or writing the most syntactically correct code, or solving a complex problem in a 1 hour interview is NOT the entire picture. Focus on your strengths, and let you strengths stand out and be noticed.
Move forward with your dreams, and focus every day on learning how best to improve your weaknesses. You'll do it, I'll do it, we just need to breathe and give it time.