Depressed and struggling with mental health and shame for not having a good career. Am I too old to do DSA? Can I make it in the IT world?

So, I got laid off 6 months ago. I'm jobless and unemployed. The thing is the last company I worked had no good opportunities to work and learn things needed. I was doing support work but was tagged as java springboot developer. I did study from good college.

Depression and anxiety and having shit thought patterns and self sabotaging behaviours got the best of me. Trauma was controlling my life.

The truth is that I'm ashamed of myself for not having any skills. I'm 24 and I want to literally start over. I have no skills to apply for my job - even for java backend role. Am I too old to study DSA? Will companies accept people with gaps?

People my age are getting 25-35L base and I can't even have the skill or confidence to apply for 10lpa jobs.