$T=\sum_{j=1}^n\lambda_jP_j$ would not be suitable for immediate generalization to infinite dimensional Hilbert Space s $\mathcal H$ Since in that case spectra of bounded self adjoint linear operator may be more complicated.
My Question is What are the complications with infinite dimensional Hilbert spaces which are not suitable for $T=\sum_{j=1}^n\lambda_jP_j$?.In simple words,What are the properties infinite dimensional Hilbert Spaces that will not be compatible with using $T=\sum_{j=1}^n\lambda_jP_j$
Reference:Page 493-494