Consider $R = \{z \in \mathbb{C} \mid \operatorname{Re}(z), \operatorname{Im}(z) \in \left[-\frac{1}{2}, \frac{1}{2}\right]\}$. By the periodicity of $f$,
$$\int_{\partial R}f(z) dz = 0.$$
However, by the residue theorem,
$$\int_{\partial R}f(z) dz = 2\pi i\operatorname{Res}(f, 0).$$
As $f$ has a simple pole at $0$, $\operatorname{Res}(f, 0) \neq 0$. Therefore, no such $f$ exists.
In my answer below, I was implicitly assuming that the covering on the boundary was trivial. As Mike Miller points out below, this is not necessarily the case. See his comments for more details.
Denote the closed orientable surface of genus $g$ with $b$ boundary components by $\Sigma_{g, b}$, and the closed non-orientable surface of genus $g$ with $b$ boundary components by $S_{g,b}$. Recall that $\chi(\Sigma_{g,b}) = 2 - 2g - b$ and $\chi(S_{g,b}) = 2 - g - b$.
If $p : M \to N$ is a covering map between manifolds with boundary, then it restricts to a covering map $p|_{\partial M} : \partial M \to \partial N$ of the same degree. So if $p : \Sigma_{g,b} \to \Sigma_{g',b'}$ is a degree $k$ covering map, then $b = kb'$. Moreover,
\begin{align*}
\chi(\Sigma_{g,b}) &= k\chi(\Sigma_{g',b'})\\
2 - 2g - b &= k(2 - 2g' - b')\\
2 - 2g - kb' &= k(2 - 2g' - b')\\
2 - 2g &= k(2 - 2g')\\
\chi(\Sigma_g) &= k\chi(\Sigma_{g'}).
\end{align*}
The converse is also true. That is, if $\chi(\Sigma_g) = k\chi(\Sigma_{g'})$ and $b = kb'$, then there is a degree $k$ covering map $\Sigma_{g,b} \to \Sigma_{g',b'}$. To see this, note that if $\chi(\Sigma_g) = k\chi(\Sigma_{g'})$, then there is a degree $k$ covering map $p : \Sigma_g \to \Sigma_{g'}$; see this answer. If $D \subset \Sigma_{g'}$ is the interior of a closed disc in $\Sigma_{g'}$, then $p^{-1}(D)$ is a disjoint union of the interiors of $k$ disjoint closed discs in $\Sigma_g$. So if $D_1, \dots, D_{b'}$ are the interiors of $b'$ disjoint closed discs in $\Sigma_{g'}$, then $p^{-1}(\Sigma_{g'}\setminus(D_1\cup\dots\cup D_{b'})$ is $\Sigma_g$ with $kb' = b$ interiors of disjoint closed discs removed, i.e. $\Sigma_{g,b}$. Therefore the restriction of $p$ to $\Sigma_{g,b}$ is a degree $k$ covering $\Sigma_{g,b} \to \Sigma_{g',b'}$.
Likewise, $\Sigma_{g,b}$ is a $k$-sheeted covering of $S_{g',b'}$ if and only if $\chi(\Sigma_g) = k\chi(S_g)$, $b = kb'$ and $k$ is even. Note that $k$ must be even as any orientable covering of a non-orientable manifold must factor through the orientation double cover.
Therefore, we have the following complete list of coverings:
- $\Sigma_{5,4} \to \Sigma_{5,4}$ of degree one,
- $\Sigma_{5,4} \to \Sigma_{3,2}$ of degree two,
- $\Sigma_{5,4} \to S_{6,2}$ of degree two,
- $\Sigma_{5,4} \to \Sigma_{2,1}$ of degree four, and
- $\Sigma_{5,4} \to S_{4,1}$ of degree four.
Best Answer
There are many surjective map $S^2 \rightarrow T$, clearly there is a surjective map $[0,1] \times [0,1] \rightarrow T$ and let $S^2 \rightarrow [0,1] \times [0,1]$ be any surjective map. For example let $S^2 \rightarrow D^2$ be the projection onto the first two coordinates (which is surjective), then since $D^2 \approx [0,1] \times [0,1]$ we are done. There are also many surjective maps $\Sigma_g \rightarrow \Sigma_h$ in general but I will leave this without a proof.
We can prove that any map $S^2 \rightarrow T$ is null-homotopic by showing that if $[-,-]$ denotes homotopy classes then $[S^2,T] = [S^2, S^1 \times S^1] = [S^2, S^1] \times [S^2, S^1]$ and then it is standard using covering space theory to prove that every map $f:S^2 \rightarrow S^1$ has to have a lift along $e^{2\pi i t}:\mathbb R \rightarrow S^1$ which means that $f$ has to be null-homotopic since $\mathbb R$ is contractible. Put all the pieces together to get that $[S^2,T]$ only has one element. I.e every map $S^2 \rightarrow T$ is nullhomotopic.