A type of local minimum (2) Data: $\Omega \subset \mathbb{R}^{n}$ is an open connected (may be unbounded) set, and locally $\partial \Omega$ is a Lipschitz graph. $S \subset \partial \Omega$ is measurable and $H^{n-1}(S)>0$. The Dirichlet data on $S$ are given by non-negative function $u^0 \in ^{1}_{Loc}(\Omega)$ with $\nabla u^0 \in L^{2}(\Omega)$. The given force function $Q$ is non-negative and measurable.
Consider the convex set 
\begin{equation}
K:=\{ v \in L^{1}_{Loc}(\Omega): \nabla v \in L^{2}(\Omega) \quad \mbox{and} \quad v=u^0 \quad \mbox{on } S\}.
\end{equation}
We are looking for an absolute minimum of the functional
\begin{equation}
J(v):= \int_{\Omega}(|\nabla v|^{2} + \chi(\{v>0\})Q^2)
\end{equation}
in the class $K$.

Definition: We call $u \in K$ a local minimum if for some small $\varepsilon>0$ we have $J(u)\le J(v)$ for every $v \in K$ with
  \begin{equation}
\|\nabla (u-v)\|_{L^{2}(\Omega)} + \| \chi(\{v>0\}) -\chi(\{u>0\})\|_{L^{1}(\Omega)} \le \varepsilon.
\end{equation}
Lemma1: If $u$ is a minimum local, then $u$ is subharmonic, hence we can assume that 
  \begin{equation}
u(x) = \lim_{r\downarrow 0} \oint_{B_r(x)}u \quad \mbox{for} \quad x \in \Omega,
\end{equation}
  where $\oint $ denotes the mean value.

Proof: For non-negative functions $\xi \in C^{\infty}_{0}(\Omega)$ we have
\begin{equation}
0 \le \limsup_{\varepsilon\downarrow 0} \dfrac{1}{2\varepsilon} (J(u- \varepsilon \xi) - J(u)) \le - \int_{\Omega} \nabla \xi \nabla u,
\end{equation}
that is, $u$ is subharmonic. Then the limit in the assertion exists for every $x \in \Omega$, and coincides with $u(x)$ for almost all $x$.
1.How can I prove the part "hence we can assume that 
\begin{equation}
u(x) = \lim_{r\downarrow 0} \oint_{B_r(x)}u \quad \mbox{for} \quad x \in \Omega,''
\end{equation}
2.How can I do the  details in the lemma

Lemma 2: If $u$ is local minimum, then $u$ is harmonic in the open set $\{u>0\}$.

proof: Use $u + \varepsilon \xi$ as first variation.
If you want the details can be found in the article Alt, H. M. and Caffarelli, L. A. Existence and regularity for a minimum problem with free boundary. J. Reine Angew. Math., 325, (1981), 105–144. and related question A type of local minimum. I thank any hint.
My thoughts for lemma 2 is that I need to prove that for all $\xi \in C^{\infty}_{0}(\{ u>0\})$ we have
$\int_{\{u>0\}} \langle \nabla u, \nabla \xi\rangle dx  = 0 $. This should follow by
\begin{eqnarray}
0 &=& \lim_{\varepsilon\rightarrow 0} \dfrac{J(u + \varepsilon \xi) - J(u)}{2 \varepsilon} \\
&=&\int_{\{u>0\}} \langle \nabla u \nabla \xi \rangle dx +  \lim_{\varepsilon\rightarrow 0^+ } \dfrac{1}{2\varepsilon}\int_{\Omega} Q^2(\chi_{\{u + \xi>0\}} - \chi_{\{u>0\}}) 
\end{eqnarray}
Then we must have
$$  \lim_{\varepsilon\rightarrow 0^+ } \dfrac{1}{2\varepsilon}\int_{\Omega} Q^2(\chi_{\{u + \xi>0\}} - \chi_{\{u>0\}}). $$
Am I rigth here?
 A: First, note that in stating your Lemma 2, Caffarelli uses Corollary 3.3 which says that $u\in C^{0,1}(\Omega)$. So we can assume this fact. Moreover, on the proof of this corollary, he uses your Lemma 1, and by using it he says that $$\tag{1}u(x)\leq \lim_{r\downarrow 0} \oint_{B_r(x)}u$$
My conclusion is that in the statement of your Lemma 1 (Lemma 2.2 in the paper), there is a typo, so what needs to be proved is just $(1)$, but this is equivalently to a function being subharmonic.
To prove Lemma 2, we just need to prove that $$\tag{2}  \lim_{\epsilon\rightarrow 0^+ } \dfrac{1}{\epsilon}\int_{\Omega} Q^2(\chi_{\{u + \epsilon\xi>0\}} - \chi_{\{u>0\}})=0 $$
Let $K=\operatorname{support}\xi$. Note that $K$ is a compact set contained in $\{u>0\}$, hence, we can find $\delta>0$ such that $u>\delta $ in $K$. Choose $\epsilon_0$ in such a way that $|\epsilon_0\xi|<\delta$ and consider $\epsilon<\epsilon_0$.
If $x\in K$, then $u(x)+\epsilon\xi(x)>\delta-\delta>0$ and $u(x)>0$,
If $x\in \{u>0\}\setminus K$, then $u(x)+\epsilon\xi(x)>0$ and $u(x)>0$,
If $x\in \Omega\setminus\{u>0\}$, then $u(x)+\epsilon\xi(x)\leq 0$ and $u(x)\leq 0$.
By combining the three cases above, we conclude that the limit in $(2)$ is in fact $0$, then Lemma 2 is proved.
