Localization of spontaneous emission in front of a mirror