This question has also been posted on MSE, but maybe here is the right place to obtain an answer.

Let $(M^3,g)$ be a compact connected oriented Riemannian $3$-manifold with nonempty boundary. The Hodge-de Rham Theorem says that there is an isomorphism between $H^1_{dR}(M)$, the first de Rham cohomology group of $M$, and the space $\mathcal{H}_N^1(M)$ of tangential harmonic $1$-forms on $M$, given by

$$\mathcal{H}_N^1(M) = \{ \omega \in \Omega^1(M) : d \omega = 0,\, d^\ast \omega=0 \text{ and } \omega(\nu) = 0 \text{ on }\partial M\},$$

where $\nu$ is a unit normal for $\partial M$.

Suppose that $H^1(M; \mathbb{Z}) \neq 0$. Then, since $\mathbb{S}^1$ is a $K(\mathbb{Z},1)$, there is a bijection

$$\Phi : [M, \mathbb{S}^1] \to H^1(M; \mathbb{Z})$$

given by $\Phi([u]) = [u^\ast(d\theta)]$, where $d\theta \in \Omega^1(\mathbb{S}^1)$ is the volume element of $\mathbb{S}^1$. Now, de Rham Theorem and the Universal Coefficient Theorem give isomorphisms

$$H_{dR}^1(M) \cong H^1(M; \mathbb{R}) \cong H^1(M;\mathbb{Z}) \otimes_{\mathbb{Z}} \mathbb{R}$$

How do I conclude from this information that there exists a smooth map $u : M \to \mathbb{S}^1$ such that $u$ is harmonic with Neumann condition and $u^\ast(d\theta)\in \Omega^1(M)$ is tangential and harmonic?