Personally, I'm leaning towards this issue being something else. I think it's more than coincidence that the heater is shutting off (and by this I assume you mean the fan is no longer blowing anything), and more than coincidence the battery light came on.

Have you had a load test on your battery or checked voltage with a multimeter at the battery with the engine off vs. while running? I'm almost wondering if the alternator brushes are starting to go. At times, they will make sufficient contact and charge the battery enough, but at other times they don't contact and the battery drains to the point the engine runs rough, headlights get real dim, etc....

Either way, I think more diagnosis is needed. Unless it was just coincidence, I don't see what an EGR failure would have to do with the heater or dash light.