I'll just add that $E(a)/E(b)$ is correct, i.e. $E(a)\cdot E(b)^{-1}$, and the inverse $\bmod n^2$ is given in libgmp via the mpz_inverse
function.
However, that's not the only way. You can also do $E(a)\cdot E(-b)$. The reason why that may be convenient is because $E(b+...+b)$ ($n$ times) is easy to calculate, being $E(b)^n$, and so there is an exponentiation function mpz_powm
that comes in handy, and either you can try using it with a negative exponent (I don't know what will happen) or you can use $N-1$, where $N$ is the order of $E(b)$ in the multiplicative group. Fermat's little theorem says $N=pq(p-1)(q-1)$ for modulus $n^2$ with $n=pq$.
Unfortunately the public key is $n=pq$, and $p+q$ (which you need) is unknown. So one has to munge that a bit. I've tried using $n^2-1$ instead of $N-1$, and it seems to work but surely it can't in general.
I'd rather trust to going from $A(p-1)(q-1)=1+Bpq$, that is $A$ is the inverse of $(p-1)(q-1) \bmod n$, $n=pq$. Then $Apq(p-1)(q-1)=n+Bn^2$, so $E(b)^{n+Bn^2}=1 \bmod n^2$, and $E(b)^{n+Bn^2-1} = E(b)^{-1} \bmod n^2$. I don't think supplying $B$ as an extra part of the public key does any harm. But I Am Not A Cryptographer.