  In this paper, we derive from the principle of least action the equation of
motion for a continuous medium with regularized density field in the context of
measures. The eventual equation of motion depends on the order in which
regularization and the principle of least action are applied. We obtain two
different equations, whose discrete counterparts coincide with the scheme used
traditionally in the Smoothed Particle Hydrodynamics (SPH) numerical method
(e.g. Monaghan), and with the equation treated by Di Lisio et al.,
respectively. Additionally, we prove the convergence in the Wasserstein
distance of the corresponding measure-valued evolutions, moreover providing the
order of convergence of the SPH method. The convergence holds for a general
class of force fields, including external and internal conservative forces,
friction and non-local interactions. The proof of convergence is illustrated
numerically by means of one and two-dimensional examples.
