Consider the integral:
$$\int\limits_{-\infty}^{\infty} \frac{1}{(x+iz)}\frac{1}{(y+iz)} dz = \frac{-2\pi}{|x-y|} $$
if $xy<0$ and zero otherwise. i.e. it is only non-zero if $x$ and $y$ are different sides of the complex axis.
Are there any similar residue-like identities but instead of integrating a contour on the complex plane, summing over values on a lattice? e.g. a discrete version of the above identity? If we replace the integral with a sum in the above equation it doesn't work but is there anything similar?