I have suffered from this also but not quite to the life threating stage. I had run a marathon only taking on water.. to my horror I over-cooked big time (and yes it was a hot day)I lost a significant amount in weight also but managed to finish the race. I spent the next 4days in bed under Dr's supervision. (+ the worst headache in history) and another 2 months before I felt strong enough to run any more than 10k.
I now use isotonic drinks such as Poweraid etc when I run the longer distances i.e 1/2 marathon up. This makes a massive difference and also helps with recovery.