We derive a new expression for the two-photon spontaneous emission (TPSE) rate of an excited quantum emitter in the presence of arbitrary bodies in its vicinities. After investigating the influence of a perfectly conducting plate on the TPSE spectral distribution (Purcell effect), we demonstrate the equivalence of our expression with the more usual formula written in terms of the corresponding dyadic Green's function. We establish a general and convenient relation between the TPSE spectral distribution and the corresponding Purcell factors of the system. Next, we consider an emitter close to a dielectric medium and show that, in the near field regime, the TPSE spectral distribution is substantially enhanced and changes abruptly at the resonance frequencies. Finally, motivated by the suppression that may occur in the one-photon spontaneous emission of an excited atom between two parallel conducting plates, we discuss the TPSE for this same situation and show that complete suppression can never occur for s → s transitions.