  A method of calculation for the variational derivatives for gravitational
actions in the pseudo-Riemannian case is proposed as a practical variant of the
first order formalism with constraints. The method is then used to derive the
metric field equations for a generic $f(R)$ model.
