Definition of topology using separation as primitive notion
It can't be done. For instance, let $X=\{0,1\}$ consider the topologies $\tau_0=\{X,\{0\},\emptyset\}$ and $\tau_1=\{X,\emptyset\}$ on $X$. Note that $\tau_0$ and $\tau_1$ have exactly the same separated sets: namely, $A,B\subseteq X$ are separated iff at least one of them is empty. So for non-$T_1$ spaces, a topology cannot always be recovered from its separation relation.