A numerical analysis of the polarization force between a sharp conducting probe and a dielectric film of finite lateral dimensions on a metallic substrate is presented with the double objective of (i) determining the conditions under which the film can be approximated by a laterally infinite film and (ii) proposing an analytical model valid in this limit. We show that, for a given dielectric film, the critical diameter above which the film can be modeled as laterally infinite depends not only on the probe geometry, as expected, but mainly on the film thickness. In particular, for films with intermediate to large thicknesses (>100 nm), the critical diameter is nearly independent from the probe geometry and essentially depends on the film thickness and dielectric constant following a relatively simple phenomenological expression. For films that can be considered as laterally infinite, we propose a generalized analytical model valid in the thin-ultrathin limit (<20-50 nm) that reproduces the numerical calculations and the experimental data. Present results provide a general framework under which accurate quantification of electrostatic force microscopy measurements on dielectric films on metallic substrates can be achieved.