Micromechanical formulation of first‐ and second‐order works in unsaturated granular media