It seems that the result is not true, at least if $H_1$ means singular homology.
The basic idea of the counterexample is to construct $f$ so that $f^{-1}(\{0\})$ doesn't contain an ordinary circle, but something like a Warsaw circle instead. This leaves open the possibility that the result might still be true for some other homology theory (Čech homology? Strong homology?) or if we restrict to a nicer class of functions (Morse functions?)
Let $X=A\cup B$, where $$A=\left\{(x,y)\in S^1\times D^4\mid \|y\|\geq\frac12\right\}$$ and $$B=\left\{(x,y)\in S^1\times D^4\mid\|y\|\leq\frac12\right\}.$$
Now, for $(x,y)\in A$, define $$f(x,y)=\left(\frac{3+x_1}2\|y\|-\frac{1+x_1}2\right)H\left(\frac{y}{\|y\|}\right),$$ where $x_1$ is the first coordinate of $x=(x_1,x_2)\in\mathbb R^2$. Note that $f$ is continuous on $A$. If $\|y\|=1,$ we have $f(x,y)=H(y)$, as required. Furthermore, if $(x,y)\in A\cap B$, i.e. if $\|y\|=\frac12$, we have $$f(x,y)=\frac{1-x_1}4H\left(\frac y{\|y\|}\right).$$
We proceed to define $f(x,y)$ for $(x,y)\in B$. First, define $q:(0,\infty)\to\mathbb R^4$ by $$q(t)=\left(\frac{\sin\frac1{t}}{2|\sin\frac1t|-8},0,0,0\right)$$ and $\phi:(0,\infty)\times\mathbb R^4\to\mathbb R^4$ by $$\phi(t,y)=y+q(t)-2\|y\|q(t).$$
The function $\phi$ has the nice properties that $\|\phi(t,y)\|\leq\frac12$ if $\|y\|\leq\frac12$ and $\phi(t,y)=y$ for $\|y\|=\frac12$. Also, for each fixed $t$, $y\mapsto\phi(t,y)$ is bijective. (Edit: Details provided at the end.) Furthermore, $$\phi\left(t,\left(\frac18\sin\frac1t,0,0,0\right)\right)=0.$$
Now, define $$f(x,y)=\frac{1-x_1}2 \|\phi(1-x_1,y)\|H\left(\frac{\phi(1-x_1,y)}{\|\phi(1-x_1,y)\|}\right).$$ Note that this is undefined for $x_1=1$ but it can be continuously extended by defining $$f((1,0),y)=0.$$ This defines $f(x,y)$ for $(x,y)\in B$. For this to make sense, we have to verify that the two definitions agree for $(x,y)\in A\cap B$. So, let $\|y\|=\frac12$. Then, $$f(x,y)=\frac{1-x_1}2\|y\|H\left(\frac y{\|y\|}\right),$$ by our observation that $\phi(t,y)=y$ for $\|y\|=\frac12$. This means that the two definitions indeed agree on $A\cap B$, so $f$ is well-defined.
Finally, we compute $f^{-1}(\{0\})$. First, for $(x,y)\in A$, $f(x,y)=0$ is possible only if $$\frac{3+x_1}2\|y\|-\frac{1+x_1}2=0,$$ which means that $$\|y\|=\frac{1+x_1}{3+x_1}=1-\frac2{3+x_1}\leq 1-\frac12=\frac12.$$ So, it is sufficient to find all $(x,y)\in B$ such that $f(x,y)=0$.
We have already observed that $\{(1,0)\}\times D^4\subseteq f^{-1}(\{0\})$, so assume $x_1\neq 1$. Then, $f(x,y)=0$ implies that $$\|\phi(1-x_1,y)\|=0$$ or eqivalently, that $$\phi(1-x_1,y)=0.$$ By our observations about $\phi$, this holds precisely if $$y=\left(\frac18\sin\frac1{1-x_1},0,0,0\right).$$ In other words, $f^{-1}(\{0\})$ is a Warsaw circle, with the usual interval at the end replaced by a $4$-disk. Therefore, $H_1(f^{-1}(\{0\})$ is trivial and we are done.
Added: Here are some more details about the function $\phi$, to make things easier to read. First, observe that $$\|q(t)\|=\frac{|\sin\frac1t|}{8-2|\sin\frac1t|}=-\frac12+\frac4{8-2\sin\frac1t}\leq -\frac12+\frac46=\frac16.$$ We claim that for any vector $q\in\mathbb R^4$ such that $\|q\|<\frac12$, the function $\psi:\mathbb R^4\to\mathbb R^4$, defined by $$\psi(y)=y+q-2\|y\|q$$ is bijective, takes the $4$-disk $\{y\mid\|y\|\leq\frac12\}$ into itself and is equal to the identity when restricted to the $3$-sphere $\{y\mid\|y\|=\frac12\}$. The last of these is obvious.
To see that the second last is true, take $\|y\|\leq\frac12$ and compute: $$\big\|y+(1-2\|y\|)q\big\|\leq\|y\|+(1-2\|y\|)\|q\|\leq\|y\|+(1-2\|y\|)\frac12=\frac12.$$
It remains to show that $\psi$ is bijective. Surjectivity is left to the reader, since we don't really use it anywhere. Injectivity is verified by a simple calculation: $$y_1+q-2\|y_1\|q=y_2+q-2\|y_2\|q$$ is equivalent to $$y_1-y_2=2(\|y_1\|-\|y_2\|)q.$$ If the two norms are equal, we have $y_1=y_2$ and we are done, otherwise the equation is equivalent to $$\frac{y_1-y_2}{\|y_1\|-\|y_2\|}=2q.$$ After taking norms, this becomes $$2\|q\|=\frac{\|y_1-y_2\|}{\big|\|y_1\|-\|y_2\|\big|}\geq 1$$ by the triangle inequality. This contradicts the fact that $\|q\|<\frac12$.
One last observation: $$\psi\left(-\frac{q}{1+2\|q\|}\right)=0.$$ This translates to the fact that $$\phi\left(t,\left(\frac18\sin\frac1t,0,0,0\right)\right)=0.$$ Thus, all properties of $\phi$ we needed are verified.