Spectral theory of pseudodifferential operators of degree 0 and an application to forced linear waves