The analogy between zeta functions and trace formulas goes at least to Selberg, when he proved his famous trace formula for hyperbolic surfaces and the result turned out to resemble Weil's generalization of Riemann's explicit formula quite a bit.
Riemann-Weil explicit formula:
\begin{equation*}
\begin{split}
\sum_\gamma h(\gamma)=\frac{1}{2\pi}\int_{-\infty}^{+\infty} h(r) \frac{\Gamma'}{\Gamma}\left(\frac{1}{4}+\frac{1}{2}ir \right)dr &+h\left(\frac{i}{2}\right)+h\left(-\frac{i}{2}\right)\\
&-g(0)\ln\pi-2\sum_{n=1}^\infty\frac{\Lambda(n)}{\sqrt{n}}g(\ln n)
\end{split}
\end{equation*}
Selberg trace formula:
\begin{equation*}
\begin{split}
\sum_{n=0}^\infty h(r_n)=\frac{\mu(F)}{4\pi}\int_{-\infty}^{+\infty} rh(r) \tanh (\pi r)dr &+\sum_n \Lambda(n) g(\ln N(n))
\end{split}
\end{equation*}
There's a big literature on this type of question, and the interplay of number theory, spectral analysis, mathematical physics... I recomend section 3 of Lagarias' survey "The Riemann Hypothesis: Arithmetic and Geometry" for references.
Connes approach started with
- "Formule de trace en géométrie non-commutative et hypothèse de Riemann" (1996)
And was completed (as far as I know) in
The main result says that given a global field $K$ and a character $\alpha=\prod_v \alpha$ of the space of adele classes $A/K$, and any adecuate test function $h$, we have:
$$\underbrace{\widehat{h}(0)+\widehat{h}(1)-\sum \widehat{h}(\mathcal{X},\rho)}_{\text{spectral side}}=\underbrace{\sum_v \int_{K_v^*}' \frac{h(u^{-1})}{|1-u|}d^*u}_{\text{arithmetic side}}$$
One proves explicit formulae essentially by integrating the logarithmic derivative of the $L$-function. For simplicity, let $\psi$ be a Schwartz function with $\psi(1) = 1$, and let
$$ \widehat{\psi}(s) = \int_0^\infty \psi(t) t^{s} \frac{dt}{t} $$
be its Mellin transform. Then one can get an explicit formula by considering
$$ \sum_{n \geq 1} \Lambda_V(n) \psi(n) = \frac{-1}{2\pi i} \int_{(2)} \frac{L'}{L}(V, s) \widehat{\psi}(s) ds. $$
Typically one would shift the line of integration to $\mathrm{Re}(s) = c < 0$, apply the functional equation, and get an expression of the form
$$\begin{align}
\sum_{n \geq 1} &\big( \Lambda_V(n) \psi(n) + \Lambda_\overline{V}(n) \tfrac{\psi(n^{-1})}{n} \big) = \\
&\{ \mathrm{polar\;data} \} - \sum_\rho \widehat{\psi}(\rho) + \frac{1}{2\pi i} \int_{(1/2)}\big( \tfrac{\gamma'}{\gamma}(V, s) + \tfrac{\gamma'}{\gamma}(V, 1-s) \big) \widehat{\psi}(s) ds + O(1).
\end{align}$$
Here, I take $\overline{V}$ to be the conjugate representation and assume the functional equation is of the form
$$ Q^{s/2} \gamma(V, s) L(V, s) = \varepsilon(V) Q^{(1-s)/2} \gamma(V, 1-s) L(\overline{V}, 1-s) $$
for collected gamma factors $\gamma(V, s)$ and a root number $\lvert \varepsilon(V) \rvert = 1$. (Brauer's On Artin's L-series with general group characters details the general functional equations, and this explicit formula is a in $\S$5.5 of Iwaniec–Kowalski).
But a major challenge in the face of being computationally useful is that we don't know the complete polar data for an arbitrary Artin $L$-function. Assuming Artin's conjecture and taking a nontrivial irreducible representation, there should be no polar contribution and we get a classical explicit formula.
Best Answer
Expanding on my comments above, most textbooks will show how the Prime Number Theorem follows from $\psi(x)\sim x$. This does not require the full strength of the Explicit Formula for $\psi(x)$, and most textbooks will prove the PNT before the Explicit Formula. One needs more than just the real part of each $\rho$ is $<1$; one needs to understand the contribution of all of them. The fact that the infinite series is not absolutely convergent complicates matters.
However, one can consider instead $$\psi_1(x)=\int_0^x\psi(u)\, du=\sum_{n\le x}(x-n)\Lambda(n)$$ This function also has an Explicit Formula $$\psi_1(x)=\frac{x^2}{2}-\sum_\rho \frac{x^{\rho+1}}{\rho(\rho+1)}-x\frac{\zeta^\prime}{\zeta}(0)+\frac{\zeta^\prime}{\zeta}(-1)-\frac{1}{2} x \log \left(1-\frac{1}{x^2}\right)-\coth ^{-1}(x)$$ and now the sum over $\rho$ is absolutely convergent. This is Theorem 28 in Ingham's "The Distribution of Prime Numbers". Ingham comments on p.74
(Updated to address the questions of Steven Clark below)
The explicit formula for $\psi_1(x)$ is not obtained by integrating the explicit formula for $\psi(x)$ term by term; again that's not allowed without absolute convergence. Instead the approach is via an inverse Mellin transform $$ I(m)=-\frac{1}{2\pi i}\int_{C(m)}\frac{x^{s+1}}{s(s+1)}\frac{\zeta^\prime}{\zeta}(s)\, ds, $$ where $C(m)$ is a large rectangle avoiding the zeros of $\zeta(s)$ The Residue Theorem, standard estimates and letting $m\to \infty$ give the explicit formula. (see Ingham for details.)