You can meet someone in your 40s. You might meet someone who already has kids and honestly, if you want kids in your life then much past 40 that’s probably the best way!
I cannot advise you on getting to the US, but it’s never too late to restart things in general. 40s is mid career, and the best of your life can still be ahead of you. I’m the same age, I’m still making plans to build and grow.
I’d advise some sort of educational refresher, see if there’s a qualification you can do that builds on (or converts) what you already have. If you want to be in tech then various places used to offer one-year conversion masters in software for existing grads. Another option might be to do a teaching qualification if that appeals.
The important thing is to make a start!
(And also I would seek some counselling for that suicidal ideation, it’s important to talk through this stuff with someone)