Well, there is certainly various manipulations one can perform in the $z$ and $\bar{z}$ variables:
There is a complex Stoke's theorem
$$ \int_R\! \mathrm{d}\eta ~=~\oint_{\partial R} \!\eta, \qquad R ~\subseteq~ \mathbb{C}, \qquad \mathrm{d}~=~\partial+\bar{\partial}~=~\mathrm{d}z\frac{\partial}{\partial z} + \mathrm{d}\bar{z}\frac{\partial}{\partial \bar{z}}, \tag{1} $$
where$^1$
$$\eta~=~ f(z,\bar{z})~ \mathrm{d}z +g(z,\bar{z}) ~ \mathrm{d}\bar{z} \tag{2}$$
is a 1-form in the Dolbeault double complex.
Often one can argue that an integration over the complex plane
$$
\int_{\mathbb{C}} \!\mathrm{d}\bar{z} \wedge \mathrm{d}z~f(z,\bar{z}) ~=~\lim_{R\to \infty} \int_{B(z_0,R)}\!\mathrm{d}\bar{z}\wedge \mathrm{d}z ~f(z,\bar{z})
\tag{3}$$
is a limit of integrations over disks $B(z_0,R)$.
One may prove that
$$\forall a,b~\in~\mathbb{C}:~~\int_{\mathbb{C}} \!\frac{\mathrm{d}\bar{z} \wedge \mathrm{d}z}{2 \pi i}~\exp\left[-(z-a)(\bar{z}-b)\right] ~=~1, \tag{4}$$
for instance by translating $z=x+iy$ into real and imaginary parts.
If e.g. $P(z)$ is a holomorphic polynomial, then
$$\fbox{$\forall a~\in~\mathbb{C}:~~ I~:=~\int_{\mathbb{C}} \!\frac{\mathrm{d}\bar{z} \wedge \mathrm{d}z}{2 \pi i}~P(z)~\exp\left[-\bar{z}(z-a)\right]~=~P(a).$}\tag{5}$$
Sketched proof of eq. (5):
$$\begin{align}
&\quad P(a)-I \quad\text{for}\quad R~\to~\infty \cr\cr
&\quad\uparrow(3)+(4) \cr\cr
&\int_{B(z_0,R)} \!\frac{\mathrm{d}\bar{z} \wedge \mathrm{d}z}{2 \pi i}~\left\{P(a)-P(z)\right\}~\exp\left[-\bar{z}(z-a)\right] \cr
~=~&\int_{B(z_0,R)} \!\mathrm{d}\bar{z} \wedge \frac{\partial}{\partial \bar{z}} \left\{\frac{P(z)-P(a)}{z-a}\exp\left[-\bar{z}(z-a)\right]\frac{\mathrm{d}z}{2 \pi i}\right\} \cr
~=~&\int_{B(z_0,R)} \!\mathrm{d}\left\{\frac{P(z)-P(a)}{z-a}\exp\left[-\bar{z}(z-a)\right]\frac{\mathrm{d}z}{2 \pi i}\right\} \cr
~\stackrel{(1)}{=}~&\oint_{\partial B(z_0,R)} \!\frac{\mathrm{d}z}{2 \pi i} \frac{P(z)-P(a)}{z-a}\exp\left[-\bar{z}(z-a)\right]\cr\cr
&\quad\downarrow \cr\cr
&\quad 0 \quad\text{for}\quad R~\to~\infty.
\end{align}\tag{6}$$
$\Box$
--
$^1$ Note that $\bar{z}=x-iy$ denotes the complex conjugate variable. It is not an independent complex variable. In particular,
$$ \frac{\partial}{\partial z} ~:=~\frac{1}{2}\left(\frac{\partial}{\partial x}-i \frac{\partial}{\partial y}\right), \qquad \frac{\partial}{\partial \bar{z}} ~:=~\frac{1}{2}\left(\frac{\partial}{\partial x}+i \frac{\partial}{\partial y}\right).\tag{7}$$
The double argument notation $f(z,\bar{z})$ is traditionally used to indicate that $f(z,\bar{z})$ is not necessarily a holomorphic function. A holomorhic function $\bar{\partial}g(z) / \partial \bar{z}=0$ is in turn written with only a single argument $g(z)$.
There are some basic approaches to choosing a good contour.
You should ask yourself is where the singularities are.
Then you should take a look at your integral domain.
Then look for symmetries (including $\sin(x)=\Im(e^{ix})$ or $f(ix)=\dots$)
Then, you need to check the asymptotes of your integrand as you approach complex infinities (such as $\lim_{x\to i\infty}e^{ix}=e^{i^2\infty}=e^{-\infty}=0$ or $\left|\frac x{(x^2+1)^2}\right|\ll\frac1{x^3}$)
For your example, one might note that:
$$x=\pm i\implies\frac1{(x^2+1)^2}=\frac10\implies\text{singularities}$$
Our integral domain is $(-\infty,\infty)$, so we'll want to check if a semicircle contour works.
In the case that we were integrating on $[0,\infty)$, you would want to note that
$$\int_{-\infty}^\infty\frac1{(x^2+1)^2}~\mathrm dx=2\int_0^\infty\frac1{(x^2+1)^2}~\mathrm dx$$
which follows from the symmetry step.
Assymptotically as $|z|\to\infty$, we can see that
$$\left|\frac1{(z^2+1)^2}\right|\ll\left|\frac1{z^3}\right|$$
Since this decays faster than $\mathcal O(z^{-1})$, we know that
$$\begin{align}\lim_{R\to\infty}\left|\int_{\{Re^{i\theta}:\theta\in[0,\pi]\}}\frac1{(z^2+1)^2}~\mathrm dz\right|&\le\lim_{R\to\infty}\int_{\{Re^{i\theta}:\theta\in[0,\pi]\}}\left|\frac1{(z^2+1)^2}\right|~\mathrm dz\\&\ll\lim_{R\to\infty}\int_{\{Re^{i\theta}:\theta\in[0,\pi]\}}\left|\frac1{z^3}\right|~\mathrm dz\\&\le\lim_{R\to\infty}\pi R\max_{z\in\{Re^{i\theta}:\theta\in[0,\pi]\}}|z^{-3}|\\&=\lim_{R\to\infty}\frac\pi{R^2}\\&=0\end{align}$$
Thus, we find nicely that
$$\int_{-\infty}^\infty\frac1{(x^2+1)^2}~\mathrm dx=\lim_{z\to\infty}\oint_{\gamma_R}\frac1{(z^2+1)^2}~\mathrm dz$$
$\gamma_R=(-R,R)\cup\{Re^{i\theta}:\theta\in[0,\pi]\}$
And the rest requires the residue theorem.
Of course, not all integrals can be tackled using a semicircle contour. Some other contours you should keep in mind:
Keyhole contour
Rectangular contour
Wedge contour
Circle contour
Each having its own use depending on the integral at hand. For example, if a function has a branch cut along a certain line, try a keyhole contour with the keyhole centered at the branch point and the keyhole along the branch cut. If a keyhole contour doesn't look friendly because there are too many singularities inside it, a wedge contour may be more suited, chosen with an angle so that it only encompasses one singularity. If a function behave peculiarly nicely along $f(x+iy)$, you may be interested in the rectangular contour. A circular contour is especially useful for integrals of the form $\int_0^{2\pi}f(\sin(\theta))~\mathrm d\theta=\int_0^{2\pi}f(\cos(\theta))~\mathrm d\theta$.
Best Answer
Let us write $b= r+it$. The real part of $b$ does not matter as you have already proven yourself. So wlog $r=0$.
For shifting along the imaginary axis, we have to employ the residue theorem. We have $$ \begin{align} \int_{-\infty}^\infty f(x+i t) \,dx&- \int_{-\infty}^\infty f(x)\, dx\\ &=\int_{-\infty-it}^{\infty-it} f(x) \,dx- \int_{-\infty}^\infty f(x)\, dx \\ &= 2\pi i \sum \text{Res}(f)+ \int_{\infty-it}^{\infty} f(x) \,dx - \int_{-\infty-it}^{-\infty} f(x) \,dx \end{align},$$ where $\sum \text{Res}(f)$ is the sum over the residues of $f$ in the area $z\in \mathbb{C}$ with $-t<\text{Im}\, z<0$.
So the two integrals are the same if there are no residues and if the two integral at $\pm \infty$ vanish (both of which is the case for your example as long as $\text{Re}\,a <0$).