Given an unbounded self-adjoint operator $T\colon H \supset \mathrm{dom}(T) \to H$ on a Hilbert space $H$ with compact resolvent, i.e. $T$ has a purely discrete spectrum, the eigenfunctions $e_n$ form an orthonormal basis of $H,$ the eigenvalues $\lambda_n \in \mathbb R$ with $|\lambda_n | \to \infty$ and $Te_n = \lambda_n e_n$ for $n \in \mathbb N.$ My question: Does a representation
$$Tx = \sum_{n=1}^\infty \lambda_n (x,e_n)_H e_n$$
for $x \in \mathrm{dom}(T) \subset H$ hold as for compact operators?
Thanks!
EDIT: I think that the answer is quite simple:
Let $x \in \mathrm{dom}(T) \subset H$ be fixed. It holds $Tx \in H$ and hence $Tx$ can be represented by
$$Tx = \sum_{n=1}^\infty (Tx,e_n)_H e_n = \sum_{n=1}^\infty (x,Te_n)_H e_n = \sum_{n=1}^\infty \lambda_n (x,e_n)_H e_n.$$
Is this correct?