Integrating the resolvent of a self-adjoint operator across a continuous part of the spectrum Let $A$ be a closed self-adjoint operator on a Hilbert space $H$, possibly unbounded and hence defined on a dense domain $D(A) \subset H$. It is well known that integrating the resolvent $R_z = (z I - A)^{-1}$ on a positively oriented simple closed $z$-contour $C$ (which is contained in the resolvent set of $A$) against a function $f(z)$ that is holomorphic on a neighborhood of $C$ and its interior gives
$$ f(P_C A) = \frac{1}{2\pi i} \oint_C f(z) R_z \, dz , \tag{*}$$
where $P_C$ is the projection onto the $A$-invariant subspace of $H$ corresponding to the part of the spectrum of $A$ that is contained within $C$. This is the (Dunford-Schwartz) holomorphic functional calculus.

Is there a way to make sense of the integral in $(*)$ if $C$ intersects the spectrum of $A$? In particular, what if $C$ transversely intersects the real line across the absolutely continuous spectrum of $A$?

I know that $\|R_z\|$ diverges as $z$ approaches the spectrum, so the integral will at the very least be improper. However, perhaps there is a way to make sense of it with some kind of regularization, distributional interpretation or restriction of the domain on which the integrand is considered. If possible, it would be a particularly convenient way to express the spectral projection onto a sub-interval $[a,b]$ of the absolutely continuous spectrum as $P_{[a,b]} = \frac{1}{2\pi i} \oint_C R_z \, dz$, where $C$ is a closed curve that intersects the real line at $a$ and $b$.
 A: Sure, why not?  I think it's a neat idea!
Probably there are lots of ways to do this. In the simplest case, where $C$ intersects the real line transversally at $a$ and $b$, I guess you could just let $C_\epsilon$ be the part of $C$ with imaginary part at least/most $\pm \epsilon$, and take the weak operator limit of the integral over $C_\epsilon$ as $\epsilon \to 0$. The main point is that the integral over $C_\epsilon$ is bounded in operator norm, uniformly in $\epsilon$. You should be able to see this by assuming $A$ is a multiplication operator, because then $\frac{1}{2\pi i} \int_{C_\epsilon} R_z\, dz$ will also be a multiplication operator, whose value at a point where $A$ takes the value $w$ is $\frac{1}{2\pi i}\int_{C_\epsilon} \frac{1}{z - w}\, dz$. Away from the points $a$ and $b$, these values are converging to either $0$ or $1$, depending on whether $w$ lies within $C$, and at those two points the limit will be some other finite value. So once we have boundedness, it is clear that the integrals converge weak operator (even strong operator) to $\alpha P_{\{a\}} + \beta P_{\{b\}} + P_{(a,b)}$ where $\alpha$ and $\beta$ are the principal value integrals of $\frac{1}{z-a}$ and $\frac{1}{z-b}$ (and you don't have to worry about them if $P_{\{a\}} = P_{\{b\}} = 0$).
