Confining potential and mass of elementary particles