In physics we use the fact that, given a self adjoint operator A, every element in Hilbert space can be written as "generalized linear combination" of the eigenstates of A:
$$\tag{1} \psi(x)=\sum a_k \psi_k(x) +\int c(\lambda)\psi_\lambda(x) d\lambda $$
Where the integral is over the continuous spectrum.
If the dimension of H is finite, the spectral theorem guarantees that this expression is valid for all self adjoint operators with no continuous part.
In the case of infinite dimension spectral theorem says that every A self adjoint is unitary equivalent to a multiplication operator, that is, via basis change, we have
$$UTU^{-1}(\psi)(x)= f(x)\psi(x)$$
In which way is this related to the possibility to write every state in the form $(1)$?
Okay. Every self-adjoint operator $A$ is unitarily equivalent to a multiplication operator on some measure space $X$. Let's assume $\|A\| \leq 1$. We can write $X = X_0 \cup X_1$ where $X_0$ is discrete and $X_1$ is atomless. The standard basis vectors in $L^2(X_0)$ are eigenvectors for any multiplication operator, so any element of $L^2(X_0)$ is an $l^2$ linear combination of these eigenvectors.
Now suppose $X_1$ is $[-1,1]$ equipped with some atomless measure $\mu$ and $A$ acts on $L^2(X_1)$ by multiplication by $x$. Then you may want to say that any $f \in L^2(X_1)$ has the form $f = \int_{[-1,1]} f(x)\delta_x\, d\mu$, where $\delta_x$ is the Dirac delta at $x$ is thought of as an eigenfunction of $A$. Whatever meaning you give to that expression is the answer to your question, because any self-adjoint multiplication operator on a separable Hilbert space is unitarily equivalent to the direct sum of a multiplication operator on a countable discrete space and multiplication by $x$ on countably many copies of $[-1,1]$, each equipped with an atomless measure. This is some version of the spectral theorem.