The good: You will have the power to make your kid's life a good one. You'll make a difference that no one else can make. Probably the decisive difference. Even if no one ever acknowledges it, you'll know it.
What to do: Think about what you have to do to keep reasonable income coming in. But also, think about what you can do to cut unnecessary expenses to the bone. No new cars. No getting hair done. No eating out. No vacations. Etc.
Within that framework, consider changing jobs. If you're living in an expensive city, leave. This is the golden era of remote work. If your current job makes you want to step in front of a train, find a new one. You can program, and there will always be someone willing to pay for that.
Your kid is everything. Start with that principle and work the problem. Godspeed.