Let the Mostowski spectrum of a set $x$, $MS(x)$, be the set of ordinals $\alpha$ which $x$ can be mapped to under the Mostowski collapse applied to some restriction of $R$ to a set - that is, some $R\cap a^2$ for $a\in V$. (Note that such are automatically set-like, so the Mostowski collapse works as usual.)
By induction on $H(x)$, $MS(x)$ is bounded; specifically, for each ordinal $\alpha$ there is some ordinal $b(\alpha)$ such that $H(x)\le \alpha$ implies $MS(x)\subseteq \beta$. For example, if $\alpha=0$, then $b(\alpha)=1$, since every $x$ with $H(x)=0$ can only ever be collapsed to $0$. (Indeed, regardless of $R$ we'll always have $b(\alpha)\le\alpha+1$, but we don't need that here.)
Let $\mu(x)=\sup MS(x)$; this map, then, has the desired property.