Why is the S-Matrix element essentially the residue of the Green function (LSZ formula)? On Wikipedia, quite similar to the script I am following the LSZ formula is given as
$$
_{out}\left<p_1,...,p_n| q_1,...,q_m \right>_{in} =\\
\int \prod_i^m \left(\textrm{d}x^4\, i e^{-q_ix_i}(\square_{x_i}-m^2)\right)\prod_j^n \left( \textrm{d}y^4\,i e^{-p_jy_j}(\square_{y_j}-m^2)\right) \left<0| T[\varphi(x_1)\ldots \varphi(x_m)\varphi(y_1)\ldots\varphi(y_n)]|0\right> \\ \equiv \,
\prod_i^m \left(-i (p_i^2-m^2)\right)\prod_j^n \left( -i (p_j^2-m^2)\right) \hat\tau(p_1...p_n,-q_1...-q_m)
$$
up to some renormalization Factors $Z$ and where $\hat \tau$ denotes the Fourier Transform of the time ordered correlation function $\left<0|T[...]|0\right>$.
It then says "..., this formula asserts that S-matrix elements are the residues of the poles that arise in the Fourier transform of the correlation functions as four-momenta are put on-shell."
How do I come to this realization? I know, that if I compute the time ordered two-point correlation function of a free field 
$$
G_F(x) = \lim_{\epsilon \downarrow 0} \int \frac{d^4k}{(2\pi)^4} \frac{e^{ikx}}{m^2-k^2-i\epsilon}
$$
and perform the $x^0$-integration here I get essentially the residue at $k^0 = \pm (\omega - i \epsilon)$, but I wasn't able to generalize this result  to the above case.
 A: The argument is completely general. The right hand side of your equation should really have a limit, where the squares of the four momenta are taken to $m^2$; i.e., they are put on shell. Now, the correlation function is multiplied by $p^2-m^2$, so the only way the limit is gonna be nonzero is if the correlation function has a pole at $p^2=m^2$; if it was regular, when multiplied by $p^2-m^2$ the result would just go to zero as $p^2 \to m^2$. The result of the limit is the residue of the pole, almost by definition.
Let's make it explicit: suppose that all the momenta except one are off shell; let's call the one that gets put on shell $p$, and suppose that for $p^2 \approx m^2$ the correlation function takes the form
$$\tau(p^2, \dots) \approx \frac{Z}{p^2-m^2} + \text{finite},$$
where $Z$ is some number and $\text{finite}$ represents things that don't diverge as $p^2 \to m^2$; this number is the residue of the pole since it is the coefficient of the $1/(p^2-m^2)$ term in the Laurent expansion. Then when put into the LSZ formula we get
$$\lim_\limits{p^2 \to m^2} (p^2-m^2) \tau(p^2, \dots) = Z,$$
so the residue $Z$ is what ends up in the RHS of the LSZ formula. Again, note that if the divergence of $\tau$ took any other form (for example a double pole, an essential singularity or a delta function), the result of the limit would be either zero or infinity. The only way to get a sensible result is to have a simple pole.
