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.