The Ep of particle m1 with respect to m2 is generally -Gm1m2/r+constant where r is distance between particles.
The constant is arbitrary so the simplest value we can let it be is 0. And that occurs if Ep=0 for r=infinity.
For multiple particles same thing works from voltage superposition.