Let $\mathscr{H}$ be a complex Hilbert space and $A$ be an Hermitian operator $A: \mathscr{H}\to \mathscr{H}$. Suppose, for a moment, that $A$ has a set of discrete eigenvalues $\{\lambda_{n}\}_{n\in \mathbb{N}}$ with corresponding normalized eigenvectors $\{e_{n}\}_{n\in \mathbb{N}}$, which are assumed to form a complete orthonormal set. Then, every $\psi\in \mathscr{H}$ can be expressed as: $$\psi = \sum_{n\in \mathbb{N}}\langle e_{n},\psi\rangle e_{n} $$

Using Dirac's notation, $e_{n}$ becomes $|n\rangle$ and $\psi$ becomes $|\psi\rangle$. Now, I was reading Nakahara's book and, at some point, he states:

If $A$ has a continuous spectrum $a$, the state is expanded as: \begin{eqnarray} |\psi\rangle = \int da \psi(a) |a\rangle \tag{1}\label{1} \end{eqnarray} and the completeness relation now takes the form: $$\int da |a\rangle \langle a| = I$$

In (\ref{1}), there seems to be an underlying assumption which is that the set of eigenvectors of an Hermitian operator on a Hilbert space spans the whole space. Although this is usually used by physicists, this is not as simple as it seems, because sometimes we have to deal with Rigged Hilbert spaces instead. This is briefly discussed here but the answers to the linked post do not provide much details.

I find it very difficult to understand the physicist point of view using what I know of functional analysis. Moreover, there seems to be quite a few books discussing these topics.

So, my question is: what is the true mathematical meaning of (\ref{1})? Do we need Rigged Hilbert spaces? Do we need the spectral theorem?