She nearly went out of her mind when she heard the news.

Literal

She [topic-は] that notice [object-を] hearing [then-て] almost mind [subject-が] went-strange.

気が変になる ('to go crazy / lose one's mind') uses 気 ('spirit, mind') as the subject of the change-of-state verb なる: literally 'one's mind becomes strange.' The same 気 anchors a huge family of mind-and-mood idioms (気がつく, 気が散る, 気にする, 気が小さい). ほとんど ('almost, nearly') sets up a near-miss — she didn't quite, but came close. 通知 ('notice, notification') is a formal-feeling noun common in administrative and legal contexts. The te-form 聞いて links cause to consequence in a clean arc.