OP you are dealing with a massive lot of horrible stress:
frustration in your career, not being allowed to do the job you want to do. I am a teacher and I know it kind of becomes you and honestly it is one of the few things that keeps me going through really difficult times - that sense of purpose and worth you get from it. I did struggle to find a job when I had to move at one point too, as I like you am UPS3 and very expensive
But I kept going to loads of interviews, kept losing out to NQTs, but in the end am glad I persevered because I found a school where my experience was actually valued and since being there have even gained a small promotion! And I love it.
But I did go through that period of wondering if I was a shit teacher and didn't deserve a job, and it did feel horrible.....
Then there is the stress of not seeing your boys - i know that's hard as I share access to my daughter too, and because I was the main breadwinner in our relationship and he did more care my husband has her more. Luckily I have a fantastic relationship with her and just treasure the time she is with me and make that really special. But certainly when she was younger it was very hard at times, I missed her so much and felt like a total failure as a mom. But you are not. Nor are you failing your 3 year old. Loads of moms work - you are working to provide for her - be proud of that. You are showing resilience in taking a job less well paid than what you could be doing rather than just giving up at that point and not working at all, which a lot of people would do.
You made absolutely the right choice to leave your first husband. Being made to sleep on the floor is disgusting abuse, and that sort of thing would probably kill you eventually (suicide) if you had to stay in it for decades.
At least you have your relationship with your lovely husband. I don't mean "what are you complaining about - you have a man so stop moaning". I mean it may be something you can focus more on when life seems really bleak.
You sound to me like a strong woman coping with a lot. Can I recommend HRT, as soon as possible - at least exploring with your GP whether it is suitable for you?
It's made my life a lot more easier to deal with, tho of course it doesn't solve everything.
Keep holding on. There will be better times ahead. It will be ok in the end - it always is - because if it's not ok it's not the end!