District councils now have a statutory duty (Homelessness Reduction Act 2017) to help prevent homelessness, so they should be working with you to help you sort this out. I'd ring and ask them for an appointment with a housing caseworker.
If the HA haven't been sending rent account statements or letters telling you that you were in arrears, I'd be pointing this out. If this has happened, they are at least partly to blame. You would have chased up the non-payment of housing benefit far sooner, had you known about it and I'd be making this clear. They will look like dicks in court if they haven't notified you before now!
If they have been sending letters etc and you've stuck your head in the sand, there's no shame in that. People do it all the time, housing officers and anyone working in homelessness prevention know this, and they shouldn't judge you for it (they're in the wrong job if they do!) It's very common for people who have depression (which is also very common in the aftermath of a relationship breakdown) to struggle to face up to stuff, so if you have a mental health diagnosis, make sure they know. (Also, some judges hate issuing possession orders when the tenant has MH issues, and HAs/councils know this!)
If proceedings have been issued, you should be entitled to help from a solicitor and CAB will be able to sort you out with one. Legal Aid should apply. (In W Suffolk, I know there is one in Bury St Edmunds, because I contemplated applying for a job there a while ago).
With regard to the housing benefit, if it was being paid, you need to know when it stopped, and why. Then people on here can advise you what you need to do about it. Also, you should have been getting full HB from when you went onto ESA. There are loads of things that can go wrong, but a claim where someone is on an income-related benefit is one of the most straightforward claims there is. If you stayed in the same council area when you moved, it should have been a simple change of circumstances. Are you sure the housing officer gave you the form for the right council? (Sounds stupid, but an HA housing officer got this wrong in Sussex not so long ago!)
But also check you're getting everything you're entitled to. A client of mine has just been awarded PIP and got £3k+ arrears payment, and it paid off his rent arrears.
Any debt adviser will tell you that your rent, including arrears payments, should be your priority, and it's true (also council tax, if you have to pay some of it). Even if it means using a food bank for basics, you need to stick to your arrears agreement, and if you have to miss a week, tell them, and tell them why.
If you have other debt, it's worth seeing the CAB about that, too. There are all sorts of debt remedies, including one that writes off all debt if debts are between £5k and £20k.
With regard to the care plan business, when children's services can see that you're taking steps to address your difficulties, they'll be fine. They may even be able to liaise with the district council, or have a team that can help you sort out the muck & fuddle you've got into.
I bloody wish you were in my neck of the woods, I'd be able to refer you to just the perfect service to help you sort this out. Suffolk may be able to refer you to something similar:
www.suffolk.gov.uk/adult-social-care-and-health/housing-help-and-support/
If they do, and the Suffolk project is half as good as the one I used to work for, they'll be exactly what you need. When you speak to children's services, ask them about getting a referral.
Good luck, and pm me if you feel you need to,