Low-voltage gyrotrons operating at near-terahertz frequencies are of great interest for numerous applications. Development of such gyrotrons in conventional configurations faces significant difficulties, especially in the case of operation at cyclotron harmonics. Some of these problems can be mitigated by using confocal resonators formed either by one pair of mirrors (a single configuration) or two pairs of mirrors (a double configuration). This paper describes the study of the effect of transverse nonuniformity of the resonator field on the gyrotron efficiency in both configurations. The study includes the analysis of operation in soft and hard self-excitation regimes.