Computation of the relation between the quark masses in lattice gauge theories and on the continuum