While looking at articles relevant to the Riemann Hypothesis, I've seen that the Riemann-Siegel Z-function $Z(t)$ is frequently used to study the Riemann zeta function along the critical line. Therefore, I decided to go on the Wolfram Functions site, and look up some interesting properties of that function. One of them I especially found interesting was this one (Formula 10.04.21.0001.01):
$$\int_0^{\infty} \frac{(3-\sqrt{8}\cos(\log(2)t))Z(t)^2}{t^2+\frac{1}{4}}~dt=\pi \log(2) \tag{1}$$ However, the site does not provide a proof of this result. Therefore, this leads me to my current question:
Question: How can we prove $(1)$?
In case one does not know the definition of $Z(t)$, it can be defined as: $$Z(t)=e^{i\theta(t)}\zeta\left(\frac{1}{2}+it\right),$$ where $\theta(\cdot )$ and $\zeta(\cdot )$ are the Riemann-Siegel Theta and Riemann Zeta functions respectively. One definition of $\theta(t)$ is: $$\theta(t) = \arg \left(\Gamma\left(\frac{2it+1}{4}\right)\right)- \frac{\log \pi}{2} t,$$ where $\Gamma(\cdot )$ is the Gamma function.
My first thought was to use the fact that the integrand is even, then consider a contour $C$ going along the real line from $-a$ to $a$ then going counter-clockwise along a semicircle centered at $0$ going from $a$ to $-a$. $$\int_0^{\infty} \frac{(3-\sqrt{8}\cos(\log(2)t))Z(t)^2}{t^2+\frac{1}{4}}~dt=\frac{1}{2}\cdot PV\int_{-\infty}^{\infty} \frac{(3-\sqrt{8}\cos(\log(2)t))Z(t)^2}{t^2+\frac{1}{4}}~dt \tag{2}$$ Hence, we must consider: $$\lim_{a \to \infty}\int_{C} f(z)~dz=\lim_{a\to \infty}\left(\int_{-a}^a f(z)~dz+\int_{\text{arc}} f(z)~dz\right),$$ where $f(z)=\dfrac{(3-\sqrt{8}\cos(\log(2)z))Z(z)^2}{z^2+\frac{1}{4}}$. I found two poles at $z=\pm \frac{i}{2}$, but only $z=\frac{i}{2}$ is bounded by $C$. The residue at that point can be evaluated easily since we know it is a simple pole: $$\operatorname*{Res}_{z=\frac{i}{2}} \dfrac{(3-\sqrt{8}\cos(\log(2)z))Z(z)^2}{z^2+\frac{1}{4}}=\lim_{z\to \frac{i}{2}} \frac{(3-\sqrt{8}\cos(\log(2)z))Z(z)^2}{z+\frac{i}{2}}=-\frac{1}{2}i\log(2)$$ I evaluated the above limit, then confirmed it using Wolfram|Alpha. Multiplying by $2\pi i$ gives $\pi \log(2)$. However, notice that my answer seems to be off by a factor of $\frac{1}{2}$ due to equation $(2)$. Hence, I suspect that either $\lim\limits_{a \to \infty} \int_{\text{arc}}f(z)~dz\neq 0$ is the issue here, or that I missed one of the conditions necessary to apply the residue theorem.
Note: An answer to my question may consist of both real and complex methods.