With SRS/Map projections, it's always a trade off. There really isn't one that is a good fit for all places of the world. Might as well assume that the earth is a sphere.
Instead of looking for a SRS that fits the whole world, I think you're better of looking for distance calculation algorithms. An example is the Great Circle Distance which is based on spherical trigonometry. It does make assumptions though like:
- 1 minute of arc is 1 nautical mile
- 1 nautical mile is 1.852 km.
The formula is:
D = 1.852 * 60 * ARCOS ( SIN(L1) * SIN(L2) + COS(L1) * COS(L2) * COS(DG)
L1 = latitude at the first point (degrees)
L2 = latitude at the second point (degrees)
G1 = longitude at the first point (degrees)
G2 = longitude at the second point (degrees)
DG = longitude of the second point minus longitude of the first point (degrees)
DL = latitude of the second point minus latitude of the first point (degrees)
D = computed distance (km)
You might want to test it with your data first though and see the results. Btw, are you using a spatial database like PostGIS?