Spectral expansion of Schwartz linear operators