The Casimir energy of a dilute homogeneous nonmagnetic dielectric ball at zero temperature is derived analytically for the first time for an arbitrary physically possible frequency dispersion of dielectric permittivity ε(iω). A microscopic model of dielectrics is considered, divergences are absent in calculations because an average interatomic distance λ is a physical cutoff in the theory. This fact has been overlooked earlier, which led to divergences in various macroscopic approaches to the Casimir energy of connected dielectrics.