A formulation for electrostatic-mechanical contact and its numerical solution