I second TPPussycat. The simple fact of the matter is that you are currently not fit to work and have been signed off sick so that you can get well and stay well - and staying well should be as much your dh's concern as your own.
Now that the weight has been lifted from your shoulders, try to put all thoughts of work - and of going back to work - out of your head for the next week or so.
Immerse yourself in some of those activities or pursuits that you always mean to get around to; that might be planning and cooking your favourite meal or a dish that you've long wanted to try, baking bread (kneading dough is a great stress reliever), sorting the linen cupboard from top to bottom or other tasks that need a few hours of concentrated effort to complete - and take plenty of time out to smell the roses.
Without turning yourself into a Stepford wife, let your dh see the benefit of a less stressed you. Spritz some beeswax furniture around the house (the inner front door frame is a good place to ensure that anyone entering will think you've spend hours cleaning!), greet his homecoming with a smile, and let the smell of fresh baking or a delicious repast lift his spirits.
Listen to radio 4 to get your mind thinking about matters unconnected to your current problems and, when you feel more relaxed, take a look at the family finances and work out how to make up any shortfall when you resign your current employment.
Coing to work incurs expense in terms of fares, lunches, clothing, etc and it could be that you won't be a great deal worse financially off after you've left your present employment - and it may also be that you're not receiving the full raft of benefits that you are entitled to.
NB: I'm using 'when' rather than 'if' in relation to you leaving your job as it's clear that particular role has fallen far short of making you a happy bunny in the workplace and has majorly contributed to your constant feelings of failure and inadequacy.
I'm also mindful of the fact that it's always better to jump before you are pushed and, from what you've reported here, it appears that the writing is on the wall in that respect.
If you haven't yet signed up for further study in September, do so now and contemplate spending the summer months as a sabbatical; a time for you to rest, regroup, rethink, and get yourself fully fit - and perhaps find a non-demanding part-time occupation that will enable you to re-establish the self-confidence in the workplace that I'm sure you once possessed.
Please understand you have not failed anyone. On the contrary, you've kept going workwise long after others would have thrown in towel and you are now taking steps to ensure that you can continue to succeed in providing a stable and happy home and continuity of care for your ds and, of course, for your dh and yourself.