Gap functions for nonsmooth equilibrium problems