There are 3 cornerstone rules which will drastically help you in these types of situations:
Rule #1: Nothing else causes stress, you cause stress on yourself. The reality is, it's impossible for anything to stress you... What happens in the brain is that you think about things and then those thoughts cause the stress. So for example, say you have a son and he breaks his leg in a soccer game tomorrow while you are unemployed. What happens is your son calls you up and tells you, then these types of thoughts run thru your head "Uh oh, this is gonna be expensive" "crap, we don't have insurance right now" etc... It's those thoughts which actually cause the "stress."
I'm not telling you not to think like that, but rather knowing that is helpful and in our society, we love to blame everything for "causing" this and that but the reality is, most of it is caused inside of our own head.
Rule #2: The most important thing is action. This is one I have absolute, 100% confidence in and have literally proven in my life time and time again. Time and time again I've come up against all odds and pulled out in almost a miraculous way and it is always because of action. So take these feelings that you are having and tell yourself this:
I am not going to stress myself out over any of this because if anything, stress will only hurt my ability to solve the problem. Instead, I am going to focus 100% effort into positive action towards solving the problem.
For me one time, that meant applying, networking, and studying my butt off to get into another career. Basically, you take all of that extra time you have and instead of complaining, feeling down, wasting time with friends, etc... You take all of that time and you use it to solve the problem and solve the problem only.
And before that, it meant losing 40lbs and getting my body fat down to 9% when it was at like 23% and I weighed 210lbs. I had to do this at a time when I wasn't happy at work either... trust me, it wasn't easy and it was very "stressful."
But I told myself:
This is what needs to be done and this is the golden ticket out of my current situation.
Always look for that golden ticket... If you're unemployed, it is making sure you have enough experience/portfolio built up and then simply exposing yourself to as many prospective employers as possible via meetups, online, LinkedIn, etc.... Problems arise when ppl get "stressed" and then start locking up, getting depressed, wasting more time and money on drugs and alcohol as a result, etc...
That last road is a ditch that you never want to be involved in but it happens to even the smartest people at times if they are not careful.
Rule #3: Don't make excuses and seek approval for everything. This is a pretty bad one for our generation of people, at least here in the US. You see posts like "Can a 45 year old get a coding job???" "Can you get an engineering job without a degree?" "Is it possible to get into programming as a single father of 2 kids with a full-time job?" etc....
Don't do this. These people are basically asking for permission to do what they want and/or looking for excuses to get out of doing what they feel is right. The reality is, no stranger on the internet or even in person can tell you what you will or will not be able to do and as mature adults, we shouldn't even care. Also, if you read about most of the "very successful" people in our society, none of them followed the typical path at all and defied all odds. In fact, when people say I can't do something, I usually go do it and I think that information is important as well for someone in your situation. Hope it helps.