Another thought: Major project, pretty major screw-up in the project (not necessarily any individual's fault, or you could well have played a major part), burnt out, stressed. Quitting can be a form of a release. So is it quitting or being fired?
I've done it and I'm not proud of myself for it.
Here's what I wished someone had told me back then:
1. Reduce your (you and your wife) expenses. Does she have a regular income? Figure out how much runway you have.
2. Discuss options with your wife.
3. Plan to finish the project. Work with your manager/boss/team. Step up and tell them your insecurity and worries if you haven't. Projects come with risks, problems and difficulty. It's normal. Finish the project and take a break.
4. Freelancing is much less about technical skills than being able to find leads and nailing the project. Majority of customers can't evaluate your technical skills or experience. In other words, that's the least of your problems unless you opt to do very specialized technical work (then you would have no problem finding work anyway).
5. There's a (maybe) good chance you'll fail at freelancing and want to go back to a job. Be mentally prepared.
6. If all fails, quit. No big deal.
Good luck. It'll be over.