In most quantum mechanics text books, the resolution of the identity or completeness relation is stated in the following (or similar) form
$$ \mathbb I_\mathcal H = \sum\limits_n |\lambda_n\rangle \langle \lambda_n| + \int |\lambda\rangle\langle \lambda| \,\mathrm d\lambda\quad , \tag{1} $$
where $|\lambda_n\rangle$ and $|\lambda\rangle$ denote the (generalized) eigenvectors of some observable $O$ (here a non-degenerate case is assumed). I wonder why or under which conditions we can do this:
In general, the spectral theorem states (at least one formulation of it) that for a given self-adjoint operator, there exists a (unique) spectral family $\{E_\lambda\}_{\lambda\in \mathbb R}$ such that
$$ O =\int\limits_\mathbb R \lambda\,\mathrm dE_\lambda \quad . \tag{2} $$
For the identity operator, we thus obtain
$$\mathbb I_\mathcal H = \int \limits_\mathbb R \mathrm dE_\lambda \quad .\tag{3} $$
I think that in order to arrive at $(1)$, we have to be able to write, at least formally, in the continuous part of the spectrum: $$\mathrm dE_\lambda = \frac{\mathrm dE_\lambda}{\mathrm d\lambda} \mathrm d \lambda = |\lambda\rangle \langle \lambda| \, \mathrm d \lambda \quad , \tag{4}$$
which suggests to me that $E_\lambda$ must be differentiable and hence continuous. Am I right to think that this, probably among other things, means that in the range of the integration in $(1)$, there cannot be an eigenvalue embedded in the continuum$?^\dagger$ I think I could make sense of $(1)$ if the spectrum is split like e.g. in the case of the hydrogen atom: For all energies below $0$, we have bound states and hence eigenvalues and eigenvectors and then the continuum part follows, not 'interrupted' by bound states again, such that we could integrate from $0$ to $\infty$.
But what happens if there is an eigenvalue embedded in the continuum? Are the corresponding projectors already in the sum in $(1)$? Then how can one appropriately split the integration domain? My concern is due to the fact that at an eigenvalue $\lambda_k$, $E_{\lambda_k}$ is not left continuous (although right continuous by definition), so I guess there could arise some problems.
Summing up: When and why can we explicitly split the discrete (more precisely point (?)) and continuous part of the spectrum in the resolution of the identity in $(1)$? In the range of the integration, is it assumed that there are no eigenvalues embedded in the continuum? If this holds true, how would the resolution of the identity look like in the case of embedded eigenvalues?
My knowledge in functional analysis as well as measure theory is very limited, hence my naive question. I know that many formulations are not precise and mathematical rigorous.
$^{\dagger}$ In chapter $2$, page $48$ of Quantum Mechanics I. Galindo and Pascual. Springer it is noted that the in order to write $(1)$, it is assumed that the corresponding operator has no continuous singular spectrum, but I don't know enough of the math such that I could make sense of this (and it isn't even defined in the book).
In all other text books (for physicists) of quantum mechanics I've looked into, if the spectral theorem was elaborated at all, then only the cases of a purely continuous and purely discrete spectrum are discussed, c.f. chapter $1$ of Quantum mechanics: A modern development. Ballentine. World Scientific or section $4.5$ in Quantum Theory: Concepts and Methods. Peres. Kluwer Academic. The examples presented there make sense to me, but no spectral family for an operator with mixed spectrum is constructed, which seems to be part of my problem in understanding this question.