f[z_] := Indeterminate /; Abs[z] < 10.^-3 (* Indeterminate near 0 *)
f[z_] := 10^100 /; Abs[z-2] < 10.^-3 (* very large near 2 *)
f[z_] := DirectedInfinity[-2-I] /; Abs[z-(-2+I)] < 10.^-3 (* infinite near -2+I *)
f[z_] := DirectedInfinity[] /; Abs[z-(2-2I)] < 10.^-3 (* ComplexInfinity near 2-2I *)
f[z_] := z (* identity elsewhere *)