Derivation of regularized field equations for the Einstein-Gauss-Bonnet theory in four dimensions