Let assume the function $\eta(E)$ has the following representation:

$$\eta(E) = \sqrt{\frac{a}{E}}$$

where $a$ is the known positive constant, and $E \in [-\infty, +\infty]$. I know that $\sqrt{a} = b$, so I think that I can rewrite the function in this way:

$$\eta(E) = \frac{b}{\sqrt{E}}$$

Lets see what happen if $E \in [-\infty, 0)$. We have:

$$\eta(E) = \sqrt{\frac{a}{-|E|}} = \sqrt{-\frac{a}{|E|}} = i \frac{b}{\sqrt{|E|}}$$

and

$$\eta(E) = \frac{b}{\sqrt{-|E|}} = \frac{b}{i\sqrt{|E|}} = -i\frac{b}{\sqrt{|E|}}$$

We get:

$$i \frac{b}{\sqrt{|E|}} =-i\frac{b}{\sqrt{|E|}}$$

which is possible only when $b = 0$. But $b$ is positive constant. Where I have made a mistake?

-

Don't forget that the square root has two solutions. In reals, we usually define that it returns the positive solution and write $\pm$ seperately. But in the complex plane, everything is a single analytical function that has two branches everythere, so you can't really say which is the principal one.
You did not make a mistake. Both answers are correct as they are both solutions to $x^2-\frac{a}{E}=0$.