Question: Assume $|f(z)|\leq 1/|y|$ for all $z\in\mathbb{C}$. Here $f$ is entire and we express $z=x+iy$. Then is $f$ constant ?

Answer: 
Let $w\in\mathbb R$ and $r > 0$ be arbitrary. Let $C$ be the circle about $w$ with radius $r$. We have
$$
\frac 1 {2\pi i}\int\_C\frac{f(z)}{z-w}\,dz = f(w)\quad\text{and}\quad\frac 1 {2\pi i}\int\_C(z-w)f(z)\,dz = 0.
$$
Hence,
$$
-f(w) = \frac 1 {2\pi i}\int\_C\frac{r^{-2}(z-w)^2 - 1}{z-w}f(z)\,dz = \frac 1 {r^2}\cdot\frac 1 {2\pi i}\int\_C\frac{(z-w)^2 - r^2}{z-w}f(z)\,dz.
$$
Now, since $\left|\frac{(z-w)^2 - r^2}{z-w}\right| = 2|\operatorname{Im}z|$ for $z\in C$, we conclude that
$$
|f(w)|\,\le\,\frac 1 {2\pi r^2}\cdot 2\pi r\cdot 2 = \frac 2 r.
$$
Letting $r\to\infty$ shows $f(w) = 0$.

BTW: Here is another answer: [Showing Entire Function is Bounded](https://math.stackexchange.com/questions/1174742/showing-entire-function-is-bounded?rq=1)
A function like this must be zero. Indeed, let $g(z) := f(1/z)$, $z\neq 0$. Then $|g(z)|\le\frac{|z|^2}{|y|}$, i.e., $|g(z)|\le\frac 1 {|\operatorname{Im} z|}$ for $z\in\mathbb D\setminus\{0\}$. From this, it follows that $z=0$ is (at most) a pole of $g$. From here, it should be easy for you to deduce that $f = 0$.