[step:Smooth the continuous null-homotopy of $\beta$ to a smooth null-homotopy with fixed boundary behaviour]
Let $\beta: [0, 1] \to U$ be a piecewise smooth loop at $x_0$. Choose a finite partition $0=s_0<s_1<\cdots<s_m=1$ such that $\beta$ is smooth on each interval $[s_{k-1},s_k]$. Choose a smooth nondecreasing surjection
\begin{align*}
\theta: [0,1] &\to [0,1]
\end{align*}
which is constant near $0$ and $1$, maps a finite partition of $[0,1]$ onto the partition $(s_k)_{k=0}^m$, and is flat at the preimages of the breakpoints $s_1,\dots,s_{m-1}$. Such a map is obtained by integrating a nonnegative $C^\infty$ function that vanishes to infinite order at the prescribed subdivision points and is positive elsewhere. Define
\begin{align*}
\hat\beta: [0,1] &\to U \\
\tau &\mapsto \beta(\theta(\tau)).
\end{align*}
Then $\hat\beta$ is smooth and has sitting instants at its endpoints, meaning that $\hat\beta(\tau)=x_0$ for $\tau$ in a neighbourhood of $0$ and for $\tau$ in a neighbourhood of $1$. Applying the one-dimensional change-of-variables formula on each interval of smoothness gives $\int_{\hat\beta}\omega=\int_\beta\omega$. Hence it suffices to prove the vanishing for smooth loops with sitting instants. Replacing $\beta$ by $\hat\beta$, assume from now on that $\beta\in C^\infty([0,1];U)$ and that $\beta$ has sitting instants.
By the [Characterisation of Simply Connected Spaces](/theorems/1883), simple connectivity of $U$ gives a continuous homotopy $H_0: [0, 1]^2 \to U$ with
\begin{align*}
H_0(s, 0) = \beta(s), \quad H_0(s, 1) = x_0, \quad H_0(0, t) = H_0(1, t) = x_0
\end{align*}
for all $s, t \in [0, 1]$. We claim there exists a smooth map $H: [0, 1]^2 \to U$ satisfying the same four boundary identities.
[claim:Smoothing of the null-homotopy rel boundary]
There exists a smooth map $H: [0, 1]^2 \to U$ with $H(s, 0) = \beta(s)$, $H(s, 1) = x_0$, and $H(0, t) = H(1, t) = x_0$ for all $s, t \in [0, 1]$.
[proof]
Set $Q := [0,1]^2$. The image $K := H_0(Q)$ is compact and contained in the [open set](/page/Open%20Set) $U$. Choose a number $\delta_* > 0$ such that every point of $\mathbb{R}^n$ whose Euclidean distance from $K$ is less than $\delta_*$ lies in $U$.
Because $\beta$ has sitting instants, choose $a \in (0,1/8)$ such that $\beta(s)=x_0$ for every $s \in [0,4a]\cup[1-4a,1]$. Decrease $a$ if necessary so that [uniform continuity](/page/Uniform%20Continuity) of $H_0$ on $Q$ gives
\begin{align*}
|H_0(y)-H_0(y')| < \frac{\delta_*}{4}
\end{align*}
whenever $y,y' \in Q$ and $|y-y'|<2a$.
Define the collar neighbourhood
\begin{align*}
N_a := \{(s,t)\in Q : s<2a \text{ or } 1-s<2a \text{ or } t<2a \text{ or } 1-t<2a\}.
\end{align*}
Define a smooth map $B: N_a \to U$ as follows: on the bottom strip $\{(s,t)\in Q:t<2a\}$ set $B(s,t):=\beta(s)$, and on the side and top strips set $B(s,t):=x_0$. These definitions agree on overlaps because $a<1/8$ prevents the top strip from meeting the bottom strip, and because $\beta(s)=x_0$ when $s<2a$ or $1-s<2a$. Thus $B$ is smooth on $N_a$ and agrees with the prescribed boundary values. Moreover, for every $y\in N_a$ there is a boundary point $y_\partial\in\partial Q$ on the same collar strip with $|y-y_\partial|<2a$ and $B(y)=H_0(y_\partial)$, hence
\begin{align*}
|B(y)-H_0(y)| < \frac{\delta_*}{4}.
\end{align*}
Let $\pi: \mathbb{R}^2 \to Q$ be the nearest-point projection onto the convex square $Q$, and define $\tilde H_0: \mathbb{R}^2 \to \mathbb{R}^n$ by $\tilde H_0(z):=H_0(\pi(z))$. Let $\eta \in C_c^\infty(B(0,1)\subseteq\mathbb{R}^2)$ be a [Standard Mollifier](/page/Standard%20Mollifier) with $\int_{\mathbb{R}^2}\eta(z)\,d\mathcal{L}^2(z)=1$, and set $\eta_\varepsilon(z):=\varepsilon^{-2}\eta(z/\varepsilon)$. Define the componentwise mollification
\begin{align*}
M_\varepsilon: \mathbb{R}^2 &\to \mathbb{R}^n \\
z &\mapsto \int_{\mathbb{R}^2}\eta_\varepsilon(z-y)\,\tilde H_0(y)\,d\mathcal{L}^2(y).
\end{align*}
[Uniform convergence](/page/Uniform%20Convergence) of mollifications on compact sets gives an $\varepsilon_0\in(0,a/4)$ such that
\begin{align*}
\|M_{\varepsilon_0}-H_0\|_{L^\infty(Q)} < \frac{\delta_*}{4}.
\end{align*}
Choose $\rho\in C^\infty([0,1];[0,1])$ with $\rho\equiv0$ on $[0,a/2]\cup[1-a/2,1]$ and $\rho\equiv1$ on $[a,1-a]$, and define
\begin{align*}
\psi: Q &\to [0,1] \\
(s,t) &\mapsto \rho(s)\rho(t).
\end{align*}
Now define $H: Q\to\mathbb{R}^n$ by
\begin{align*}
H(y):=
\begin{cases}
\psi(y)M_{\varepsilon_0}(y)+(1-\psi(y))B(y), & y\in N_a,\\
M_{\varepsilon_0}(y), & y\in Q\setminus N_a.
\end{cases}
\end{align*}
The two formulas agree smoothly near the interface because $\psi\equiv1$ on a neighbourhood of $Q\setminus N_a$. Therefore $H$ is smooth on $Q$ in the sense that it is the restriction of a smooth map on a neighbourhood of $Q$.
If $y\in Q\setminus N_a$, then $|H(y)-H_0(y)|<\delta_*/4$. If $y\in N_a$, the preceding estimates and $0\le\psi\le1$ give
\begin{align*}
|H(y)-H_0(y)| \leq \psi(y)|M_{\varepsilon_0}(y)-H_0(y)|+(1-\psi(y))|B(y)-H_0(y)| < \frac{\delta_*}{4}.
\end{align*}
Thus $H(Q)\subseteq U$. Finally, if $y\in\partial Q$, then $\psi(y)=0$ and $H(y)=B(y)$, so $H(s,0)=\beta(s)$, $H(s,1)=x_0$, and $H(0,t)=H(1,t)=x_0$ for all $s,t\in[0,1]$.
[/proof]
[/claim]
Henceforth $H \in C^\infty([0, 1]^2; U)$ denotes a smooth null-homotopy of the smooth loop $\beta$ rel boundary, satisfying the four identities above.
[/step]