  The modified Langevin noise formalism has been proposed for the correct
charaterization of quantum electromagnetic fields in the presence of
finite-sized lossy dielectric objects in free space. The main modification to
the original one (also known as the Green's function approach available only
for bulk inhomogeneous lossy dielectric medium) was to add fluctuating sources
in reaction to the radiation loss. Consequently, a resulting electric field
operator is now determined by (i) boundary-assisted and (ii) medium-assisted
fields on an equal footing, which are fluctuating sources due to radiation and
medium losses, respectively. However, due to the lengthy mathematical
manipulation and complicated concepts, the validity of the modified Langevin
noise formalism has not been clearly checked yet.
  In this work, we propose and develop a novel numerical framework for the
modified Langevin noise formalism by exploiting computational electromagnetic
methods (CEM). Specifically, we utilize the finite-element method to
numerically solve plane-wave-scattering and point-source-radiation problems
whose solutions are boundary-assisted and medium-assisted fields, respectively.
Based on the developed numerical framework, we calculate the Purcell factor of
a two-level atom inside or outside a lossy dielectric slab. It is numerically
proved, for the first time, that one can retrieve the conventional expression
of the spontaneous emission rate, viz., the imaginary part of the Green's
function.
  The proposed numerical framework is particularly useful for estimating the
dynamics of multi-level atoms near practical plasmonic structures or
metasurfaces.
