Here is another solution of the problem. It is based on constructing a function that is constant on each equivalence class and has different values on different classes.
equivalences[lst_List] := Block[{f},
Scan[(f[#[[1]]]=f[#[[2]]]=Unique[x])&,lst];
Scan[(Evaluate[f[#[[1]]]]=f[#[[2]]])& , lst];
Reap[Sow[#, f[#]]& /@ Union@@lst][[2]]]
Only for large intial sets of initial equivalences Carl Woll's solution seems to be slightly faster.
Regards,
Fred Simons
Eindhoven University of Technology