Question: why does eowyn almost died?
Answer: Her constitution already severely weakened by her loneliness and despair, combined with her physical injuries, Éowyn succumbed to a severe case of the Black Breath. Théoden, not knowing that she was nearby, told Merry with his dying words that she had been "dearer than daughter" to him.