Solution (source code)

= Solution

Let $\tau=t-t'$ and $\Omega=\sqrt{K^2-b^2}>0$. Because $|e^{-i(u+iv)\tau}|=e^{v\tau}$, close below for $\tau>0$ and above for $\tau<0$. The lower closure is clockwise. The two <residues> sum to $i e^{b\tau}\sin(\Omega\tau)/\Omega$. Hence, for nonzero $b$,
$$
\boxed{G(\tau)=
\begin{cases}
-e^{b\tau}\sin(\Omega\tau)H(-\tau)/\Omega,&b>0,\\
 e^{b\tau}\sin(\Omega\tau)H(\tau)/\Omega,&b<0.
\end{cases}}
$$
In particular, \b[the printed sign with $e\gamma>0$ gives zero for $t>t'$ and an <advanced Green function> for $t<t'$]. Reversing that sign puts the <poles> below and gives a <retarded Green function>. Both solutions have the unit <derivative> jump required by $(\partial_\tau^2-2b\partial_\tau+K^2)G=\delta(\tau)$. If $b=0$, the bare integral has real-axis <poles> and requires an additional contour prescription; a unique retarded or advanced answer cannot be inferred without one.