Notice that it suffices to prove the following result:
Barnes' beta integral. For $a, b, c, d \in \{ z \in \Bbb{C} : \Re(z) > 0 \}$, we have
$$ \begin{split}
&\frac{1}{2\pi} \int_{-\infty}^{\infty} \Gamma(a+it)\Gamma(b+it)\Gamma(c-it)\Gamma(d-it) \, \mathrm{d}t \\
&\hspace{12em} = \frac{\Gamma(a+c)\Gamma(a+d)\Gamma(b+c)\Gamma(b+d)}{\Gamma(a+b+c+d)}.
\end{split} \tag{1} $$
In view of the principle of analytic continuation, it suffices to consider the case when $a > b > 0$ and $c > d > 0$. If we denote by $B(a,b,c,d)$ the LHS of $\text{(1)}$, then it is easy to check that $B(a,b,c,d) \in \Bbb{R}$:
$$ \overline{B(a,b,c,d)} = \frac{1}{2\pi} \int_{-\infty}^{\infty} \Gamma(a-it)\Gamma(b-it)\Gamma(c+it)\Gamma(d+it) \, \mathrm{d}t = B(a,b,c,d) $$
by applying the substitution $t \mapsto -t$. Now in order to compute $B(a,b,c,d)$, we utilize the following formula formula for the beta function:
$$ \frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)} = \int_{0}^{\infty} \frac{u^{a-1}}{(1+u)^{a+b}} \, du. $$
Then we have
$$ B(a,b,c,d)
= \frac{1}{2\pi} \Gamma(a+c)\Gamma(b+d)\int_{-\infty}^{\infty} \mathrm{d}t \int_{0}^{\infty} \mathrm{d}x \int_{0}^{\infty} \mathrm{d}y \, \frac{x^{a-1+it}}{(1+x)^{a+c}} \frac{y^{b-1+it}}{(1+y)^{b+d}}. \tag{2} $$
In order to compute this nasty triple integral, we want to interchange the order of integral. Even if we pretend that the Fubini's theorem works, it turns out that the resulting integral fails to be improperly integrable. So we introduce a small trick using the following theorem:
Theorem. (Abel). If $f(x)e^{-\epsilon x} \in L^1([0,\infty))$ for all $\epsilon > 0$ and $I := \lim_{R\to\infty} \int_{0}^{R} f(x) \, \mathrm{d}x$ exists, then we have the following convergence:
$$ \lim_{\epsilon \to 0^+} \int_{0}^{\infty} f(x) e^{-\epsilon x} \, dx = I. $$
Using this, the triple integral in the RHS of $\text{(2)}$ can be computed as
\begin{align*}
&\int_{-\infty}^{\infty} \mathrm{d}t \int_{0}^{\infty} \mathrm{d}x \int_{0}^{\infty} \mathrm{d}y \, \frac{x^{a-1+it}}{(1+x)^{a+c}} \frac{y^{b-1+it}}{(1+y)^{b+d}} \\
&\hspace{3em} \stackrel{\text{(3)}}{=} \int_{-\infty}^{\infty} \mathrm{d}t \int_{0}^{\infty} \mathrm{d}x \int_{0}^{\infty} \mathrm{d}y \, \frac{x^{a-1}}{(1+x)^{a+c}} \frac{y^{b-1}}{(1+y)^{b+d}} \, \cos(t\log(xy)) \\
&\hspace{3em} \stackrel{\text{(4)}}{=} \lim_{\epsilon \to 0^+} \int_{-\infty}^{\infty} \mathrm{d}t \int_{0}^{\infty} \mathrm{d}x \int_{0}^{\infty} \mathrm{d}y \, \frac{x^{a-1}}{(1+x)^{a+c}} \frac{y^{b-1}}{(1+y)^{b+d}} \, \cos(t\log(xy)) e^{-\epsilon |t|} \\
&\hspace{3em} \stackrel{\text{(5)}}{=} \lim_{\epsilon \to 0^+} \int_{0}^{\infty} \mathrm{d}x \int_{0}^{\infty} \mathrm{d}y \, \frac{x^{a-1}}{(1+x)^{a+c}} \frac{y^{b-1}}{(1+y)^{b+d}} \frac{2\epsilon}{\epsilon^2 + \log^2(xy)}.
\end{align*}
Here are some explanation to each step:
- (3) is obtained by taking the real part of the integrand, since we know that the the integral is real.
- (4) is an application of the theorem above.
- (5) follows from the Fubini's theorem and the Laplace transform of the cosine function.
Now we apply the substitution $\log(xy) = \epsilon u$ to the inner integral. Then
\begin{align*}
&\int_{-\infty}^{\infty} \mathrm{d}t \int_{0}^{\infty} \mathrm{d}x \int_{0}^{\infty} \mathrm{d}y \, \frac{x^{a-1+it}}{(1+x)^{a+c}} \frac{y^{b-1+it}}{(1+y)^{b+d}} \\
&\hspace{3em} \stackrel{\text{(6)}}{=} \lim_{\epsilon \to 0^+} \int_{0}^{\infty} \mathrm{d}x \int_{-\infty}^{\infty} \mathrm{d}u \, \frac{x^{a+d-1}}{(1+x)^{a+c}} \frac{e^{\epsilon b u}}{(e^{\epsilon u} + x)^{b+d}} \frac{2}{1+u^2}.
\end{align*}
Now it is easy to check that
$$\frac{e^{\epsilon b u}}{(e^{\epsilon u} + x)^{b+d}} \leq 1+ x^{-b-d}.$$
Thus by the assumptions on the magnitude of $a, b, c, d$, the integrand of the RHS of $\text{(6)}$ is dominated by an integrable function. Then by the dominated convergence theorem, we can put the limit inside the integral and we have
\begin{align*}
&\int_{-\infty}^{\infty} \mathrm{d}t \int_{0}^{\infty} \mathrm{d}x \int_{0}^{\infty} \mathrm{d}y \, \frac{x^{a-1+it}}{(1+x)^{a+c}} \frac{y^{b-1+it}}{(1+y)^{b+d}} \\
&\hspace{3em} = \int_{0}^{\infty} \mathrm{d}x \int_{-\infty}^{\infty} \mathrm{d}u \, \frac{x^{a+d-1}}{(1+x)^{a+b+c+d}} \frac{2}{1+u^2} \\
&\hspace{3em} = 2\pi \frac{\Gamma(a+d)\Gamma(b+c)}{\Gamma(a+b+c+d)}.
\end{align*}
This completes the proof of $\text{(1)}$.