Gap equation with pairing correlations beyond the mean-field approximation and its equivalence to a Hugenholtz-Pines condition for fermion pairs