Application of Liouville's Theorem
Solution 1:
Let $\sum_{n=0}^\infty a_n z^n$ be the Taylor expansion of $f(z)$. Also denote $a_{-1}=a_{-2}=0$. By definition, $$a_n=\frac{1}{2\pi i}\int_{|z|=R}\frac{f(z)}{z^{n+1}}dz,\quad\forall n\ge -2,\, \forall R>0.\tag{1}$$
Note that $\mathrm{Im} (z)=\frac{z-\bar{z}}{2i}$, so when $|z|=R$, $$\mathrm{Im} (z)=\frac{z-\frac{R^2}{z}}{2i}.\tag{2}$$ Substituting $(2)$ into $(1)$, we have $$a_{n-1}-R^2 a_{n+1}=\frac{1}{\pi}\int_{|z|=R}\frac{\mathrm{Im} (z)\cdot f(z)}{z^{n+1}}dz,\quad\forall n\ge -1,\, \forall R>0.\tag{3}$$ By the assumption of $f$ and continuity, $|\mathrm{Im} (z)\cdot f(z)|\le 1$ on $\mathbb{C}$. Then from $(3)$ we know $$|a_{n-1}-R^2a_{n+1}|\le \frac{2}{R^n},\quad\forall n\ge -1,\, \forall R>0.\tag{4}$$
Given $n\ge -1$, dividing both sides of $(4)$ by $R^2$ and letting $R\to \infty$, we have $a_{n+1}=0$. Therefore, all the coefficients of the Taylor expansion of $f$ are $0$, i.e. $f\equiv 0$.
Solution 2:
"Me too!" Fix an arbitrary $a\in \mathbb R$. By Jensen's inequality for every $r>0$ we have $$\begin{split} 2\pi \log|f(a)| &\le \int_0^{2\pi} \log|f(a+re^{it})|\,dt \le \int_0^{2\pi} \log(|r\sin t|^{-1})\,dt \\ &= -2\pi\log r- \int_0^{2\pi} \log(|\sin t|)\,dt \end{split}$$ The integral on the right is finite, because $ \log |x|$ is integrable near $0$. Let $r\to \infty$ to conclude $f(a)=0$. Since $f$ vanishes on $\mathbb R$, it vanishes identically.
By the way, this works equally well for bounds like $|f(z)|\le 1/|\mathrm{Im}\,z|^{N}$ or even $|f(z)|\le \exp( 1/|\mathrm{Im}\,z|^{1-\epsilon})-1$. Fails with the assumption $|f(z)|\le \exp( 1/|\mathrm{Im}\,z|)-1$, probably for a good reason.