fa.functional analysis – Hilbert space representation of a vector in terms of a continuous eigenbasis

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}}_{nin mathbb{N}}$ with corresponding normalized eigenvectors ${e_{n}}_{nin mathbb{N}}$, which are assumed to form a complete orthonormal set. Then, every $psiin mathscr{H}$ can be expressed as:
$$psi = sum_{nin mathbb{N}}langle e_{n},psirangle e_{n} $$

Using Dirac’s notation, $e_{n}$ becomes $|nrangle$ and $psi$ becomes $|psirangle$. 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}
|psirangle = int da psi(a) |arangle tag{1}label{1}
end{eqnarray}

and the completeness relation now takes the form:
$$int da |arangle 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?