A new method to correct formation energies of charged defects obtained by supercell densityfunctional calculations is presented and applied to bulk, surface, and low-dimensional systems. The method relies on atomistic models and a polarizable force field to describe a material system and its dielectric properties. The polarizable force field is based on a minimal set of fitting parameters, it accounts for the dielectric screening arising from ions and electrons separately, and it can be easily implemented in any software for atomistic molecular dynamics simulations. This work illustrates both technical aspects and applications of the new corrective scheme. The method is tested on systems in vacuo to validate the energy scheme. It is applied to charged defects in the bulk and at the surface of realistic materials to achieve comparison with published results obtained by using available corrective schemes based on continuum electrostatics treatments. Moreover, to demonstrate its generality, the method is used to correct the formation energy obtained by DFT of a singly negatively charged S vacancy in monolayer, bilayer, trilayer and bulk MoS2.