We present an efficient exact diagonalization scheme for the extended dynamical mean-field theory and apply it to the extended Hubbard model on the square lattice with nonlocal charge-charge interactions. Our solver reproduces the phase diagram of this approximation with good accuracy. Details on the numerical treatment of the large Hilbert space of the auxiliary Holstein-Anderson impurity problem are provided. Benchmarks with a numerically exact strong-coupling continuous-time quantum-Monte Carlo solver show better convergence behavior of the exact diagonalization in the deep insulator. Special attention is given to possible effects due to the discretization of the bosonic bath. We discuss the quality of real axis spectra and address the question of screening in the Mott insulator within extended dynamical mean-field theory.