Smoothing a Sobolev function

Let $$ {\tilde u}(x)= \begin{cases} u(x); &\text{if } \varphi(x)=0, \\ \\ \int_{{\mathbb R}^n} \eta_{\varphi(x)}(y-x) u(y)\, dy; & \text{if } \varphi(x) > 0. \end{cases} $$

We shall first show that $\widetilde u$ is $L^2(\mathbb R^n)$. First we observe that $\widetilde u$ in $\mathbb R^n\smallsetminus\mathrm{supp}\,\varphi$ is identical to $u$ and for every $x\in\mathrm{supp}\,\varphi$ $$ |\widetilde u(x)| \le \int_{\mathbb{R}^n}|\eta_{\varphi(x)}(y-x)|\, |u(y)|\, dy\le \|u\|_{L^2(\mathbb R)^n}\|\eta\|_{L^2(\mathbb R)^n}=M. $$ Hence $\widetilde u$ is a sum of an $L^2$-function and a bounded and compactly supported function, and hence also an $L^2$-function. Thus $\widetilde u\in L^2(\mathbb R^n)$.

Next, following the idea of Davide Giraudo.

It is clear that $\widetilde u$ can be written as $$ J_\varphi[u](x)=\widetilde u(x)=\int_{\Bbb R^n}\eta(t)\,u\big(x+\varphi(x)t\big)\,dt. \tag{1} $$ and if $u$ is sufficiently smooth, then \begin{align} \partial_j\widetilde u(x)&=\int_{\Bbb R^n}\eta(t)\,\Big(1+\sum_{k=1}^n\partial_k\varphi(x)t\Big)\partial_ju(x+\varphi(x)t)dt\\ &=\widetilde{\partial_j u}(x)+\sum_{k=1}^n \partial_k\varphi(x)\int_{\Bbb R^n}t\,\eta(t)\,\partial_ju\big(x+\varphi(x)t\big)\,dt, \end{align} and

$$ \int_{\Bbb R^n}t\,\eta(t)\,\partial_ju\big(x+\varphi(x)t\big)\,dt= \begin{cases} u(x)\int_{\mathbb R^n}t\,\eta(t)\,dt; &\text{if } \varphi(x)=0, \\ \\ \int_{{\mathbb R}^n} (y-x)\,\eta_{\varphi(x)}(y-x) \partial_j u(y)\, dy; & \text{if } \varphi(x) > 0. \end{cases} $$ It is not hard to see (using similar arguments) that $\widetilde{\partial_j u}\in L^2(\mathbb R^n)$.

It remains to explain what happens if $u$ is not smooth.

In such casse we can find smooth $u^\varepsilon$, such that $u^\varepsilon\to u$, in the $H^1$-norm, and simply check that is $u^\varepsilon-u^{\varepsilon'}$ tends to zero, as $\varepsilon,\,\varepsilon'\to 0$, so does $\widetilde u^\varepsilon-\widetilde u^{\varepsilon'}$.