Spontaneous emission rates in a dielectric structure are position dependent and proportional to the local optical density of states. The latter can be calculated when the Green function is known. In our scalar formalism, we model dielectric slabs as infinitely thin planes and use the T-matrix formalism of multiple-scattering theory to find an exact analytical expression for the Green function of a dielectric mirror of arbitrary number of unit cells N. All the propagating and guided modes of the structure are found. There are at most N guided modes and their dispersion relations are studied. The guided modes appear around frequencies corresponding to the first stop band in normal direction. Local densities of propagating and guided modes are presented, also for frequencies where the layered structure acts as an omnidirectional mirror.