What are the (types of) singularities of $$f(z)=\frac{\cos(z)}{(z-\frac{i}{2})^2}$$ defined on $\mathbb{C}\cup\{\infty\}$?
I know that $i/2$ is a pole of order $2$. There are no other singularities in $\mathbb{C}$. But what is with $\infty$? Do I have to check if $f(1/z)$ hat a singularity in $0$? $\cos(1/z)$ has an essential singularity in $0$.
You are correct. Besides the pole, $f$ has an essential singularity at $\infty$. We see that $$f(1/z) = -\frac{4z^2 \cos(1/z)}{(z+2i)^2};$$
And the conclusion follows as $\cos(1/z)$ has an essential singularity at zero, and multiplication by $z^2$ cannot change that (look at the Laurent series).
And as a sanity check: if $f$ did possess no essential singularity at $\infty$, then it would define a meromorphic function on the Riemann sphere. But as $f$ has infinitely many zeroes and the sphere is compact, these zeroes must have a limit point, and by the identity theorem $f$ must be identically zero. (And a slight improvement of this idea shows that the meromorphic functions on the sphere are precisely the rational functions.)