$T = \int_{\sigma (T)} \lambda dP(\lambda)$
where $\sigma (T)$ is the spectrum of $T$ and $P$ is a regular projection-valued measure supported on $\sigma (T)$.