Consider the set $\Omega = \mathbb{R}^2 \setminus \overline{B_1(0)}$, so $\mathbb{R}^2$ without the closed unit ball. We are given a curl-free $C^1$-vector field on $\Omega$. We want to show that a $C^2$ potential $\varphi$ exists on $\Omega$ if and only if the line integral $$\int_{\partial B_2(0)} \left< f, \mathrm{d}x \right> = 0. \tag{$\star$}$$ I have already proven that when given such a potential, then $f$ must be conservative (since $\Omega$ is open and connected), meaning that all loops vanish (including $(\star)$).
For the other implication, I am now supposed to proceed by defining the subsets $\Omega_+$ and $\Omega_-$ as $$\Omega_{\pm} = \left\{(x, y) \in \Omega \mid \pm y < \frac{1}{2} \right\}.$$ We would then show that these two are simply connected (we are not required to properly prove this, since this is in the context of an analysis 2 course). From this it follows from the curl-freeness of $f$ that there are two potentials $\varphi_+, \varphi_- \in C^2$ on $\Omega_{\pm}$ such that $\nabla \varphi_{\pm} = f|_{\Omega_{\pm}}$.
The next step would be to prove the implication, but this is where I'm totally stuck. I don't really understand what $(\star)$ gives me or why I need it. Am I supposed to define a piecewise potential from the two $\varphi_+, \varphi_-$ and then show it really is $C^2$ and a potential on the entirety of $\Omega$? And if so, how would I use $(\star)$ to show this? I have tried to substitute $f$ in the line integral by a potential constructed piecewise from $\varphi_+, \varphi_-$ but this just lead me to a $0 = 0$ situation.
Any help is much appreciated!