We propose a method to deal with the so-called near-field corrections to the solution of the Poisson equation for full-potential first-principles calculations using the exact two-center expansion for the inverse of the distance between two points. It is demonstrated that the method gives a very satisfying solution to the Poisson equation for plane-wave charge densities which can be solved analytically. The present method gives reasonable total energy for lattice distortions where the conventional multipole expansion gives large errors.