I [topic-は] wife [object-を] choose [in-のに] terrible mistake [object-を] did.
~のに here means 'in the act of, when it comes to' — marking the domain where the mistake occurred. 大変な ('terrible, serious') modifies 間違い ('mistake'). A frank, somewhat blunt personal admission.