Whoever conditions disbelief on something and intends to disbelieve if it happens, he becomes a disbeliever immediately. Therefore, you must pronounce the two testimonies of faith (Shahada) and reconcile with your wife if she is in her waiting period (Iddah). It is recommended to consult the Department of Fatwa for further guidance. And Allah Knows Best.