I have a question which is related to changing an improper integral into a contour integral that 'looks' similar, but is not the same. The author (D.H. Griffel) says that it is 'right' to do it, but I don't understand why. It appears this is related to the standard thesis in the use of Green's functions. The author and I want to 'solve' the PDE $$ u_{tt} - \nabla^2 u = f. $$ The author rewrites the problem as $$ (\partial_t ^2 - \nabla_x^2) w(\vec{x},t;\vec{y},s) = \delta(x-y) \delta(t-s). $$ By using the Fourier transform he finds $$ -(\omega^2 - |\vec{k}|^2) v = e^{i(\vec{k}\cdot \vec{y} - \omega s)} $$ with $v$ being the Fourier transform of $w$. Now the question of contour integration arises. The author says that $$ w(\vec{x},t;\vec{y},s) = \frac{1}{4 \pi^3 |\vec{y} - \vec{x}|} \int_{0}^\infty k \sin k |\vec{y} - \vec{x}| I(k)\, \, dk $$ with $$ I(k) = \int_{- \infty}^\infty \frac{e^{i\omega(s-t)}}{k^2 - \omega^2} d\omega. $$ The author can't evaluate this integral because it has poles at $\omega = \pm k$. Instead, the author evaluates different contour integral that avoids the poles and is closed in the upper- or lower half-plane.
But my 'gripe' is that these integrals are not the same integral as $I(k)$. The author says that each choice of integration contour corresponds to a different $w$. My question:
- Why is it relevant to look at these alternative integral contours; after all, we're not interested in them. I can't see a reason why they are related to the integral we want to determine that would give us $w$. Is this anecdotal, or something rigorous?
- How can the author prove that each choice of contour corresponds to different boundary conditions?
What do I mean by 'the integrals are not the same':
- $I(k)$ is not a complex number for almost any $k$ (in the sense of lebesgue or riemann)
- The integral of the integrand of $I$ over a contour avoiding the poles is a complex number (in the sense of riemann).
In the case so-called $i \varepsilon$-prescription is something mathematical, it would be great if you could provide a reference to the theorem, or just post the theorem and idea for the proof here.

Different $i\epsilon$ prescriptions in fact correspond to different boundary conditions on the Green function.
Your function $w$ is defined by a second order partial differential equation which does not completely specify it until boundary conditions are given. The different contours give you different functions which satisfy the same differential equation but have different homogeneous parts - they differ by solutions to the homogeneous differential equation and these parts parameterise the possible boundary conditions on your equation.
As pointed out in the comments, the integral is not well posed due to the poles and requires either a regularisation or modification to its definition. This could be done in some cases by using the Principal Value but there are other options such as deforming the contour to avoid the poles (these coincide for certain choice of contour).