Energy spectra of electrons and depressed potential collector in gyrotrons