Analogy between $\mathbb{S}^1, \mathbb{R}$ and $\mathbb{Z}/m\mathbb{Z}, \mathbb{Z}$? When one first learns about covering spaces (e.g. in Ch.1 of Hatcher), one typically learns about $\mathbb{S}^1$ and its universal cover $\mathbb{R}$. When one does calculations $\mod 1$, one lifts to the universal cover and works there instead.
By analogy, I want to think about $\mathbb{Z}/m\mathbb{Z}$ and its "universal cover" $\mathbb{Z}$ as discrete analogues of what is discussed above. Indeed, when one works $\mod m$, one often lifts to the "universal cover" $\mathbb{Z}$, and does basic operation there before "projecting down" to the original space $\mathbb{Z}/m\mathbb{Z}$.
The above two examples are clearly in different categories. The former is in the category of  topological spaces.
My Question: Is there a way to make the analogy more rigorous by formalizing the second example? (In particular, what is the correct notion of "covering space" in this context, and the corresponding notion of "fundamental group"?)
 A: A simple framework that encapsulates both examples is the notion of a short exact sequence of (topological) groups; the first is
$$0 \to \mathbb{Z} \to \mathbb{R} \to \mathbb{R}/\mathbb{Z} \to 0$$
and the second is
$$0 \to \mathbb{Z} \xrightarrow{m} \mathbb{Z} \to \mathbb{Z}/m \to 0.$$
Writing the second example as
$$0 \to \mathbb{Z} \to \frac{1}{m} \mathbb{Z} \to \left( \frac{1}{m} \mathbb{Z} \right) / \mathbb{Z} \to 0$$
shows that the second sequence even embeds into the first, and taking the colimit over all $m$ produces the sequence
$$0 \to \mathbb{Z} \to \mathbb{Q} \to \mathbb{Q}/\mathbb{Z} \to 0$$
where $\mathbb{Q}/\mathbb{Z}$ can be thought of as the group of roots of unity, which is the torsion subgroup of $S^1$. So you can informally think of the second sequence as a "discrete approximation" to the first, which becomes increasingly good but not quite perfect as $m \to \infty$. This can be used to relate, at least informally again, the theory of Fourier series on $\mathbb{R}/\mathbb{Z}$ and the discrete Fourier transform on $\mathbb{Z}/m$.
Whether this exhibits $\mathbb{Z}$ as the "universal cover" of $\mathbb{Z}/m$ in any sense is unclear to me. It seems to me that there is no way of producing the surjection $\mathbb{Z} \to \mathbb{Z}/m$ from $\mathbb{Z}/m$ functorially; in fact a choice of such a surjection is equivalent to a choice of generator, of which there are $\varphi(m)$. Similarly to produce a surjection $\mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}/2 \times \mathbb{Z}/2$ would involve picking a basis. But the universal cover is functorial given a basepoint (that is, it's functorial on pointed (nice) path-connected spaces), which for a topological group is conventionally taken to be the identity.
