Distinction between state space and space of functions In Quantum Mechanics a particle is described by its wave function $\Psi : \mathbb{R}^3\times \mathbb{R}\to \mathbb{C}$. In that sense, the state of a particle at time $t_0$ is characterized by a function $\Psi(\cdot, t_0) : \mathbb{R}^3\to \mathbb{C}$. The space of all functions like that which are suitable for a given situation is then a susbet of $L^2(\mathbb{R}^3)$ the set of square-integrable function in $\mathbb{R}^3$, equiped with the inner product
$$(\psi,\varphi) = \int_{\mathbb{R}^3}\bar{\psi}(x)\varphi(x) d^3x.$$
Now, the book I'm studying, introduces another space. The space of states $\mathcal{E}$ whose elements are kets $\left|\psi\right\rangle\in \mathcal{E}$. The author states that although isomorphic, $\mathcal{E}$ is not the space of functions I've described above.
More than that, he says that the ket $\left|\psi\right\rangle$ is the element of $\mathcal{E}$ associated to the function $\psi$.
I simply can't get the idea here of why to introduce this $\mathcal{E}$, and what $\mathcal{E}$ really is. Saying that it is a space isomorphic to the space of functions is very vague, since I believe there are tons of spaces isomorphic to it. Also, saying it is the space of kets seems vague too, because $\left|\psi\right\rangle$ as I understand is just a notation.
In that setting, why does one need to distinguish between the space of functions I've described and the space $\mathcal{E}$? In truth, what is $\mathcal{E}$ rigorously?
 A: $\mathcal{E}$ is just a separable Hilbert space. Since all separable Hilbert spaces are isomorphic (non-canonically, alas), nothing further has to be specified about this. The elements of this abstract space are written as kets.
Since $L^2(X)$ is a separable Hilbert space for $X=\mathbb{R}^n$ (it is for a larger class of spaces, but that's not relevant here), it is isomorphic to the abstract $\mathcal{E}$.
The idea to stress here is that quantum mechanics does not necessarily take place as "wave mechanics" on $L^2(\mathbb{R}^3)$. It's a theory on any separable Hilbert space, and $\lvert \psi \rangle$ denotes the abstract element of $\mathcal{E}$ that is associated to a wavefunction $\psi(x)\in L^2(\mathbb{R}^3)$ by the map
$$ \mathcal{E} \to L^2(\mathbb{R}^3), \lvert \psi \rangle \mapsto \psi(x) := \langle x \vert \psi \rangle$$
for the continuous eigenbras $\langle x \rvert$ of the position operator $x$ on $\mathcal{E}$. There's a subtlety here that the "eigenbras" of the continuous spectrum do not lie inside the Hilbert space $\mathcal{E}$ itself, but in the larger space of the associated Gel'fand triple. A nice introduction to the concept by user1504 is here.
Conversely, a given wavefunction defines a bra by
$$ \langle\psi\rvert := \int \psi(x)\langle x \rvert \mathrm{d}^3 x$$
which, if $\psi(x)$ is a permissible wavefunction, will lie inside the actual Hilbert space and thus have a dual ket $\lvert \psi \rangle$.
A: In a certain sense, $\psi(\mathbf x)$ is to $|\psi\rangle$ as $v^i$ is to $\mathbf v$.
We say that $\mathbf v$ is vector in a vector space while $v^i$ are the components of $\mathbf v$ on some basis:
$$\mathbf v = \sum_i v^i\;\vec e_i$$
where
$$v^i = \mathbf v \cdot \vec e_i$$
Analogously, $|\psi\rangle$ is a ket in a vector space while $\psi(\mathbf x)$ are the components of $|\psi\rangle$ on the position basis.
If $|\mathbf x\rangle$ are the orthonormal basis kets for the position basis, we have
$$|\psi\rangle = \int \mathrm d^3x \; \psi(\mathbf x)|\mathbf x\rangle$$
and
$$\psi(\mathbf x) = \langle \mathbf x|\psi\rangle$$
