  Galaxy formation requires a process that continually heats gas and quenches
star formation in order to reproduce the observed shape of the luminosity
function of bright galaxies. To accomplish this, current models invoke heating
from supernovae, and energy injection from active galactic nuclei. However,
observations of radio-loud active galactic nuclei suggest that their feedback
is likely to not be as efficient as required, signaling the need for additional
heating processes. We propose the self-annihilation of weakly interacting
massive particles that constitute dark matter as a steady source of heating. In
this paper, we explore the circumstances under which this process may provide
the required energy input. To do so, dark matter annihilations are incorporated
into a galaxy formation model within the Millennium cosmological simulation.
Energy input from self-annihilation can compensate for all the required gas
cooling and reproduce the observed galaxy luminosity function only for what
appear to be extreme values of the relevant key parameters. The key parameters
are: the slope of the inner density profile of dark matter haloes and the outer
spike radius. The inner density profile needs to be steepened to slopes of -1.5
or more and the outer spike radius needs to extend to a few tens of parsecs on
galaxy scales and a kpc or so on cluster scales. If neutralinos or any thermal
relic WIMP with s-wave annihilation constitute dark matter, their
self-annihilation is inevitable and could provide enough power to modulate
galaxy formation. Energy from self-annihilating WIMPs could be yet another
piece of the feedback puzzle along with supernovae and active galactic nuclei.
