Kids sense the tension anyway, so tell them right away before they start blaming themselves or losing trust.
Telling them directly also lets you control the narrative. If they accidentally overhear the news from a phone call or a relative instead, it's way more traumatic.