The principle of $\in$-Recursion is a consequence of the regularity axiom. The formulation I know is:
$\in$-Recursion: Let $G: V \to V$ be a class function, defined everywhere. Then there is a unique class function $F: V \to V$ such that $\forall x(F(x) = G(F \restriction x))$.
How does this theorem adapt to set functions?
The Mostowski Collapse Lemma says that
Mostowski Collapse: Let $X$ be a set such that $(X, \in )$ satisfies the axiom of extensionality. Then there is a unique transitive set $M$ and a unique isomorphism $\pi: (X, \in)\to (M, \in )$.
To prove the lemma, we define $\pi(b) = \{ \pi(a) : a \in b \land a \in X\}$. Is this a case of $\in$-recursion? If so, what should be $G$ that defines $\pi$?
This is absolutely a definition by $\in$-recursion (on $X$). Your $G$ here is the range function: $G(f) = \{b: (a,b)\in f\}$ (assuming $f$ is a function... zero or some other default value otherwise).