A relaxation result for energies defined on pairs set-function and applications