Let $\psi(x)=\sum_{n\leq x} \Lambda(n)$ be the weighted prime counting function. I am trying to evaluate the integral $$\kappa:=\int_{1}^{\infty}\frac{\psi(x)-x}{x^{2}}dx$$ in several different ways. Originally, this integral came up as a particular part in a particular case for a a formula for a summatory function I was looking at. From now on, let $\gamma$ refer to the Euler-Mascheroni constant.

(Now Corrected:) I found a fun, elementary approach to this integral which gave $\kappa=-1-\gamma$ if we assume the quantitative prime number theorem. (Precisely, we just need to assume that this integral is absolutely convergent. ) Since I am not too confident about this, I naturally wanted to check by complex analytic methods to see if my answer was correct. My question then is:

What other ways can be used to prove this identity?

I feel like knowing many approaches to this problem will give a greater understanding of certain properties of these functions. A friend suggested that it must be related to the logarithmic derivative of $\zeta(s)$, and certain special values, but I cannot see how to use this.

Thanks a lot!

**Additional Remark:**

I attempted to use the explicit formula for $\psi(x)$, and deduced $\kappa=-\gamma-1$. Originally I felt this was wrong, but after reading Julian Rosen's answer I think it is correct. Here is the alternate solution:

Substituting in the explicit formula, and then integrating termwise we have$$\kappa=\int_{1}^{\infty}\left(-\sum_{\rho}\frac{x^{\rho-2}}{\rho}-\frac{\log2\pi}{x^{2}}-\frac{\log\left(1-x^{-2}\right)}{2x^{2}}\right)dx=\sum_{\rho}\frac{1}{\rho(\rho-1)}-\log2\pi+1-\log2$$since

$$\frac{1}{2}\int_{1}^{\infty}\frac{\log\left(1-x^{-2}\right)^{-1}}{x^{2}}dx=\frac{1}{2}\int_{1}^{\infty}\sum_{i=1}^{\infty}\frac{1}{ix^{2i+2}}dx=\sum_{i=1}^{\infty}\frac{1}{2i(2i+1)}=1-\log2.$$As $$\sum_{\rho}\frac{1}{\rho(\rho-1)}=\sum_{\rho}\frac{1}{\rho-1}-\frac{1}{\rho}=-\sum_{\rho}\frac{1}{1-\rho}+\frac{1}{\rho}=2B=-\gamma-2+\log4\pi$$it follows that $\kappa=-\gamma-1$.