Spectral micromagnetic analysis of switching processes