In special relativity the concept of potential is not defined. In general relativity potential is related to gravitational fields. To describe a potential of a massive star one could use the Schwarzschild metric.
Assuming that the object in a potential field is not moving the total energy $E$, which should stay conserved, is its rest mass $m_0$ plus the potential plus the kinetic energy. By defining the relativistic mass as the total energy of an object at rest one could see the dependence on the potential.
Derivation
The Schwarzschild metric can be writtten as
$$\rm{d}s^2=-(1-\frac{2M}{r})dt^2 + (1-\frac{2M}{r})^{-1}dr^2 - r^2(d\theta^2+\sin^2\theta d\phi^2)$$ with $M$ the mass of the star, $r$ the distance from the star and angles $\theta$ and $\phi$.
The metric is independent of time, hence there is a Killing vector $K^\mu=(1,0,0,0)$ related to the momentum dual vector $p_\mu$ such that $K^\mu \cdot p_\mu=const=p_0 =p_t=E$ - the total conserved energy of the object as seen at infinity.
The momentum mass relation reads $p^\mu \cdot p_\mu=-m^2_0$. Or in components:
$$p^\mu \cdot p_\mu = p_\nu \cdot p_\mu\, g^{\mu\nu}=p_t p_t g^{tt} + p_r p_r g^{rr} + p_\theta p_\theta g^{\theta\theta} +p_\phi p_\phi g^{\phi\phi}=-m^2_0.$$Let the object be at rest: $p_r=p_\theta=p_\phi=0$. Hence one obtains $$p_t p_t g^{tt}=-E^2(1-\frac{2M}{r})^{-1}=-m^2_0.$$
$E$ is the total energy of the object at rest in a grav potential and can aswell be defined as the relativistic mass which would be dependent on the distance from the star or on the potential
$$m=m_0\sqrt{(1-\frac{2M}{r})}.$$
The relativistic mass of an object at rest at infinity would just be its rest mass.