Active thermal control for reliability improvement of MOS-gated power devices