Using the variational cluster approach (VCA), we study the transition from the antiferromagnetic to the superconducting phase of the two-dimensional Hubbard model at zero temperature. Our calculations are based on a new method to evaluate the VCA grand potential which employs a modified Lanczos algorithm and avoids integrations over the real or imaginary frequency axis. Thereby, very accurate results are possible for cluster sizes not accessible to full diagonalization. This is important for an improved treatment of short-range correlations, including correlations between Cooper pairs in particular. We investigate the cluster-size dependence of the phase-separation tendency that has been proposed recently on the basis of calculations for smaller clusters. It is shown that the energy barrier driving the phase separation decreases with increasing cluster size. This supports the conjecture that the ground state exhibits microscopic inhomogeneities rather than macroscopic phase separation. The evolution of the single-particle spectum as a function of doping is studied in addtion and the relevance of our results for experimental findings is pointed out.