How to determine the spectrum from the diagonal Green's function Let $L: L^2(\mathbb{R}) \supseteq Dom(L) \rightarrow L^2(\mathbb{R})$ be a densely defined closed operator. Assume that the resolvent admits an integral kernel (Greens function) $G$, i.e. for $z\in \mathbb{C}\setminus \sigma(L)$ and every $f\in L^2(\mathbb{R})$ the resolvent satisfies
$$ ((L-z)^{-1}f)(x) = \int_{\mathbb{R}} G(z,x,y) f(y) dy. $$
We denote by $g$ the diagonal Greens function
$$ g(z,x) := G(z,x,x). $$

Is it true that the spectrum of $L$ consists of the discontinuities of $g$? Or is there another way to obtain the spectrum from the diagonal Greens function?

If this is in general not true, how is it in the case of Sturm-Liouville operators
$$ L = -\Delta + V, \ Dom(L)= H^2 (\mathbb{R}),$$
where $V \in C^\infty (\mathbb{R}, \mathbb{R})\cap L^\infty (\mathbb{R}, \mathbb{R})$?
 A: For the Sturm–Liouville operators with discrete spectrum, $G(z,x,y)$ is the Stieltjes transform of the discrete measure $$\mu_{x,y}(ds) = \sum_{n = 1}^\infty \varphi_n(x) \overline{\varphi_n(y)} \delta_{-\lambda_n}(ds) ,$$ that is, $$G(z,x,y) = \int_\mathbf{R} \frac{1}{z - s} \, \mu_{x,y}(ds) =  \sum_{n = 1}^\infty \frac{\varphi_n(x) \overline{\varphi_n(y)}}{z - \lambda_n} \, .$$ So yes, $G(z,x,x)$ indeed determines the spectrum: it is a meromorphic function with a simple pole at $\lambda_n$ with residue $|\varphi_n(x)|^2$, unless $\varphi_n(x) = 0$. This means that the spectrum is determined by the values of $G(z,x,x)$ for a single point $x$, provided that $\varphi_n(x) \ne 0$ for all $n$.
In the continuous spectrum case (which you are interested in) things are slightly more complicated: $G(z,x,y)$ is again a Stieltjes transform of a measure $\mu_{x,y}(ds)$. This time it is no longer a discrete measure, but it is supported in the spectrum of $L$. In principle, the set of discontinuities of $G(z,x,x)$ need not be closed in this case. However, the closure of this set is indeed the support of the Stieltjes measure $\mu_{x,x}$. And the union of all supports of $\mu_{x,x}$ will exhaust the spectrum of $L$.
I do not know good references for these claims. Properties of Stieltjes transforms are discussed in a lovely book Bernstein functions by Schilling, Song and Vondraček. The properties related to supports of $\mu_{x,x}$ which I used above can be derived from generalised eigenfunction expansion of the heat kernel, but I am sure there is a simpler way to do this. Finally, the above approach seems to be pretty general, but my guess would be that some further restrictions on $L$ are necessary. At the very least, we need finiteness and continuity of $G(z,x,y)$ in $x$ and $y$ near the diagonal.
