In this article, the cooling of a solid surface by an evaporating film of a dielectric liquid and the influence of an electric field on this process are studied. The mesoscopic lattice Boltzmann method is applied to simulate the fluid flow with phase transitions and the heat transfer. The cases without electric field, with initially uniform electric displacement field, and with non-uniform electric field are considered. A uniform field enhances the cooling slightly. Non-uniform field leads to the rupture of the film. In this case, the local heat flux in local regions increases significantly when the film becomes thin and effectively evaporates. After the rupture of the film, the heat flux from a dry spot decreases abruptly. The formation of a dry spot can be prevented by switching off the electric field before the film rupture. Thus, we demonstrate the possibility of enhanced cooling of local regions at a surface using pulses of non-uniform electric field acting on a thin film of dielectric liquid placed at the surface. If the inflow of liquid to the film could be provided, it is in principle possible to realize a periodic process of application of voltage pulses to electrodes and to enhance the cooling of surface by the evaporation of a film of dielectric liquid.