The correct formulation of the result is called spectral theorem. It encompasses all type of spectra for self-adjoint operators, and thus both (1) and (2).
Given a self adjoint operator $A$ with only discrete spectrum (you have such situations for compact operators, and operators with compact resolvent) the spectral theorem has a nice and simple form:
$$A=\sum_{i}\lambda_i P_i\; ,$$
where the sum ranges over all possible eigenvalues $\lambda_i$ and $P_i$ is the projection on the eigensubspace corresponding to $\lambda_i$ (that if the eigenvalue has multiplicity one has the form $\lvert \psi_i\rangle\langle \psi_i\rvert$ where $\psi_i$ is the normalized eigenvector). The spectral theorem gives also the so-called functional calculus (I will not be completely precise mathematically but to give the idea will be enough): given a suitable function $f:\mathbb{R}\to \mathbb{C}$, the operator $f(A)$ is defined by
$$f(A)=\sum_i f(\lambda_i)P_i\; .$$
The particular case of $e^{-itA}$ is the one that gives you quantum evolution.
Now if $B$ is an operator with general spectrum (i.e. a discrete part and a continuum one) the theorem still holds, but instead of having a simple discrete family of projections $P_i$ we have what is called a spectral family $\{P_\Omega\}_{\Omega\in \{X, X\subseteq \mathbb{R}\}}$ of projections. This family is uncountable, so you cannot take the sum, but it defines a projection valued measure $dP_\lambda$ (a function from sets to self-adjoint projections that satisfies the axioms of a measure) and it is possible to integrate functions with respect to it. So the spectral theorem for (measurable) functions $f$ of $B$ becomes:
$$B=\int_{\mathbb{R}}\lambda dP_\lambda\; ,$$
$$f(B)=\int_{\mathbb{R}}f(\lambda) dP_\lambda\; .$$
Or, in the case of the evolution operator $e^{-itB}$ applied to $u\in \mathscr{H}$ (the Hilbert space):
$$u(t)=e^{-itB}u=\int_{\mathbb{R}}e^{-it\lambda} dP_\lambda u \; .$$
Observe that if $B$ has only discrete spectrum, the corresponding measure is just the sum of delta measures pointed at each discrete eigenvalue $\lambda_i$, so it can be written $dP_\lambda = \sum_i \delta(\lambda-\lambda_i)P_\lambda d\lambda$. Therefore the discrete spectrum is just a special case of the spectral theorem.
Anyways, what you are writing is an operator on the right hand side, and a function on the left hand side, so it is not correct as written ;-)