We report thermal effects revealed by a self-consistent treatment of plasma and lattice heating in vertical cavity surface-emitting lasers (VCSELs). The basic idea of our treatment is to couple the equations for carrier density and field amplitude in the conventional laser theory with those for two additional variables, the plasma and lattice temperatures. The CW operation of the VCSELs is investigated both for a fixed and for a self-consistently determined lattice temperature. In the first case plasma heating results in an increase of carrier density with pumping and thus in a pumping dependent frequency shift. In the latter case, both plasma and lattice heating induce a thermal switch-off of the laser as the pumping is increased. Furthermore, depending on the initial alignment of the cavity frequency and the ambient temperature of the device, heating can introduce a discontinuous threshold, exhibiting a bistability between lasing and nonlasing states. While some of our theoretical predictions are in qualitative agreement with known experiments, others await experimental verification.