Geometric transition from hyperbolic to anti-de Sitter structures in dimension four