If $G$ is abelian such that $mG=G$ for some $m\in\Bbb{Z}$ then every short exact sequence splits
Your proof (plus the hint in the comments) is more succint, but we can also do it explicitly:
Pick some lift $\widetilde{1}$ in $E$ of the element $1 \in \mathbb{Z}_m$. Now $m\widetilde{1}$ is in the kernel of $g$, so it's in the image of $f$; say it's $f(\alpha)$. By hypothesis, there is $\beta \in G$ with $m\beta = \alpha$.
The claim is then that the map $\phi: \mathbb{Z}_m \to E$ given by $\phi(j) = j(\widetilde{1} - f(\beta))$ is a splitting of this sequence. You need to check that $\phi(m) = 0$ (else the map wouldn't be well-defined) and that $g \phi$ is the identity map, both of which are straightforward.