I have nothing useful, or even philosophical to add, other than to say I'm really sorry, man.
Experience is the teacher who always gives the lesson after you've already failed the test. Nobody should have to go through this sort of thing, but anybody who does anything does. You are a doer. As such, you get smacked down, get up, dust off, and get smacked down again. Such is the lot of the builder of things.
You sir, are the man.