First prove that a non-constant analytic function can have at most finitely many zeros in a bounded, compact set. Proof idea: if it's bounded and compact, and has infinitely many zeros, there must be an accumulation point, so the function must be identically zero.
Now notice that $z_i=1/(n\pi)$ is such a sequence for $f(z)$.