I often read something like "the Feynman propagator is the Green's function of the Klein-Gordon equation", so I try to write it as a sum over eigenfunctions, as should be possible for any Green's function. The eigenvalue problem is $$(\square + m^2)\psi(x) = -\lambda \psi(x),$$ which can be solved easily by writing $$\psi(x) = e^{-ip\cdot x},$$ with $p = (p_0, \vec p)$, implying an eigenvalue of $\lambda = p^2 - m^2$. Then I recall that, for a discrete spectrum $\lambda_n$, the Green's function looks like 
$$G(x, y) = \sum_{n} \frac{\psi_n(x)\psi_n(y)^*}{\lambda_n}$$

and hope something similar also holds for a continuous spectrum, writing 
$$G(x, y) = \int d\lambda\frac{\psi(x)\psi(y)^*}{\lambda}.$$
Cearly this wrong but close -- the $\lambda$ in the denominator becomes the $p^2 - m^2$ I expect. Besides anything about my approach which may be wrong, my main question is: how do I get the correct measure to show up?