We present a new practical scheme to study the spectroscopic propertie
s of molecules embedded in optically complex surroundings. The respons
e function accounting for the modification of the spectroscopic behavi
or of the molecules is derived self-consistently in direct space throu
gh the numerical solution of Dyson's equation. We apply this scheme to
investigate near-field optical effects due to fluorescence phenomena.
Experimentally relevant examples show that the dramatic decay of the
molecular lifetime upon approaching a surface defect could achieve wel
l-resolved imaging of subwavelength structures.