  Based on the photon-exciton Hamiltonian a microscopic theory of the Casimir
problem for dielectrics is developed. Using well-known many-body techniques we
derive a perturbation expansion for the energy which is free from divergences.
In the continuum limit we turn off the interaction at a distance smaller than a
cut-off distance $a$ to keep the energy finite. We will show that the
macroscopic theory of the Casimir effect with hard boundary conditions is not
well defined because it ignores the finite distance between the atoms, hence is
including infinite self-energy contributions. Nevertheless for disconnected
bodies the latter do not contribute to the force between the bodies. The
Lorentz-Lorenz relation for the dielectric constant that enters the force is
deduced in our microscopic theory without further assumptions.
  The photon Green's function can be calculated from a Dyson type integral
equation. The geometry of the problem only enters in this equation through the
region of integration which is equal to the region occupied by the dielectric.
The integral equation can be solved exactly for various plain and spherical
geometries without using boundary conditions. This clearly shows that the
Casimir force for dielectrics is due to the forces between the atoms.
  Convergence of the perturbation expansion and the metallic limit are
discussed. We conclude that for any dielectric function the transverse electric
(TE) mode does not contribute to the zero-frequency term of the Casimir force.
