If you're strapped for cash as a software dev, either you're not budgeting appropriately (take a sober look at how often you eat out), or you're not making nearly as much as you could (look for a different job), or you've set yourself up to live beyond your means (switch cars, or look for a different living situation). I've been in both of the first two situations before, and getting out of them had as much to do with a different mindset and finding good people to be around. I've always tried to live within my means (aka not taking on more than a couple weeks worth of debt if I can afford not too). That being said, taking that close look at your finances can be difficult when you're not in a good place mentally, so if you can get some help there, I'd recommend it.
If you have family, or really close friends, you might see if you can crash with them for a while, working on a career pivot during that time, or just looking for a different workplace.
I lost a tech job in December of 2018, and didn't get back into tech until August of 2019, and ended up working fast food for a few months. It was a nice time for clarifying some things, and establishing my identity beyond "guy who writes code". Before I was let go, I was struggling with getting things done and fitting into my workplace.
A big YMMV on this, but do try to take some time to walk and start considering some angles to life that might seem more crazy than you'd normally consider.