# Feynman propagator as a sum over eigenfunctions

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?

$$(m^2+ \square_x -i \epsilon) G(x-x^\prime)=\delta^{(d)}(x-x^\prime) \tag{1} \label{1}$$ of the Green function of the Klein-Gordon operator in $$d$$ dimensions with Feynman boundary conditions. Inserting the Fourier integral $$G(x-x^\prime)=\int\! \frac{d^dp}{(2\pi)^d}\, e^{-ip(x-x^\prime)}\tilde{G}(p) \tag{2} \label{2}$$ and the integral representation of the $$d$$-dimensional delta function, $$\delta^{(d)}(x-x^\prime)= \int \! \frac{d^dp}{(2\pi)^d}\,e^{-ip(x-x^\prime)} \tag{3} \label{3}$$ into \eqref{1}, we obtain $$\tilde{G}(p) = \frac{1}{m^2-p^2+i\epsilon} \tag{4} \label{4}$$ and the Green function \eqref{2} takes the form $$G(x-x^\prime) = \int \! \frac{d^dp}{(2\pi)^d} \, \frac{e^{-ip(x-x^\prime)}}{m^2-p^2+i \epsilon}. \tag{5} \label{5}$$ Defining $$u_p(x)=\frac{e^{-ipx}}{(2\pi)^{d/2}}, \tag{6} \label{6}$$ being eigenfunctions of the Klein-Gordon operator, $$(m^2+\square -i \epsilon) u_p(x)=(m^2-p^2+i \epsilon) u_p(x), \tag{7} \label{7}$$ with eigenvalues $$m^2-p^2+i \epsilon$$, the Green function can indeed be written as $$G(x-x^\prime) = \int\! d^dp \,\frac{u_p(x) u_p(x^\prime)^\ast}{m^2-p^2+i \epsilon}. \tag{8}$$