[proofplan]
We first prove a finite-set approximation lemma: given finitely many elements and a tolerance, we construct one positive contraction that approximately acts as a left and right identity on that finite set. The construction uses the positive element obtained by summing both $a^*a$ and $aa^*$, then applies continuous functional calculus to a scalar cutoff function. Directing the pairs consisting of a finite subset and an error tolerance turns these local approximants into a net. The same construction applies inside a closed two-sided ideal, and the condition $f(0)=0$ ensures that the functional-calculus element remains in the ideal.
[/proofplan]
[step:Construct one positive contraction for a finite subset]
Let $F\subset A$ be a finite subset and let $\varepsilon>0$. We claim that there exists $e\in A$ such that $e\ge 0$, $\|e\|_A\le 1$, and, for every $a\in F$,
\begin{align*}
\|a-ae\|_A<\varepsilon
\end{align*}
and
\begin{align*}
\|a-ea\|_A<\varepsilon.
\end{align*}
If $F=\varnothing$, take $e=0$. Assume now that $F\ne\varnothing$. Define
\begin{align*}
b:=\sum_{a\in F}(a^*a+aa^*)\in A.
\end{align*}
Each summand is positive, hence $b$ is positive. Let
\begin{align*}
\eta:=\varepsilon^2.
\end{align*}
Let $R:=\|b\|_A$. If $R=0$, then every summand $a^*a$ has norm $0$, so every $a\in F$ is $0$ by the C*-identity, and $e=0$ works. Assume $R>0$. Define the [continuous function](/page/Continuous%20Function)
\begin{align*}
f:[0,R]\to[0,1],\qquad f(t):=\frac{t}{t+\eta}.
\end{align*}
Then $f(0)=0$. By continuous functional calculus for the positive element $b$, define
\begin{align*}
e:=f(b)\in A.
\end{align*}
Since $0\le f\le 1$, the functional-calculus norm rule gives $\|e\|_A\le 1$. Also, if
\begin{align*}
q:[0,R]\to[0,1],\qquad q(t):=\sqrt{f(t)},
\end{align*}
then $q$ is continuous, $q(0)=0$, and $e=q(b)^*q(b)$ by the multiplicative and involutive rules of continuous functional calculus. Hence $e$ is positive.
We now estimate the right error. Work in the unitization $A^+$ when $A$ is nonunital, and denote its unit by $1_{A^+}$. For each $a\in F$, the element $b-a^*a$ is positive because it is a finite sum of positive elements. Hence
\begin{align*}
0\le (1_{A^+}-e)a^*a(1_{A^+}-e)\le (1_{A^+}-e)b(1_{A^+}-e)
\end{align*}
in the C*-order of $A^+$. The C*-identity in $A^+$ gives
\begin{align*}
\|a-ae\|_A^2=\|(a(1_{A^+}-e))^*a(1_{A^+}-e)\|_{A^+}.
\end{align*}
Therefore
\begin{align*}
\|a-ae\|_A^2\le \|(1_{A^+}-e)b(1_{A^+}-e)\|_{A^+}.
\end{align*}
Since $e=f(b)$ commutes with $b$ in the commutative C*-subalgebra generated by $b$, the functional calculus identifies
\begin{align*}
(1_{A^+}-e)b(1_{A^+}-e)=h(b),
\end{align*}
where
\begin{align*}
h:[0,R]\to[0,\infty),\qquad h(t):=t(1-f(t))^2=\frac{t\eta^2}{(t+\eta)^2}.
\end{align*}
For every $t\in[0,R]$,
\begin{align*}
h(t)\le \eta.
\end{align*}
Thus $\|h(b)\|_{A^+}\le \eta$, and consequently
\begin{align*}
\|a-ae\|_A^2\le \eta=\varepsilon^2.
\end{align*}
It follows that $\|a-ae\|_A\le \varepsilon$. Replacing $\varepsilon$ at the start by any smaller positive number gives the strict inequality.
For the left error, use the other half of the definition of $b$. Since $b-aa^*$ is positive, the same argument applied to $aa^*$ gives
\begin{align*}
\|a-ea\|_A^2=\|(1_{A^+}-e)aa^*(1_{A^+}-e)\|_{A^+}\le \|h(b)\|_{A^+}\le \eta.
\end{align*}
After the same harmless reduction of the initial tolerance, $\|a-ea\|_A<\varepsilon$ for every $a\in F$.
[guided]
The aim is to build one element $e$ that almost behaves like a unit for all elements of a prescribed finite set $F$. The reason for using the single positive element
\begin{align*}
b:=\sum_{a\in F}(a^*a+aa^*)
\end{align*}
is that it simultaneously dominates both $a^*a$ and $aa^*$ for every $a\in F$. The first domination controls $\|a-ae\|_A$, and the second controls $\|a-ea\|_A$.
Let $\varepsilon>0$ be fixed and set
\begin{align*}
\eta:=\varepsilon^2.
\end{align*}
If $F=\varnothing$, the element $e=0$ satisfies all required inequalities. If $F\ne\varnothing$, define $b$ as above. Each element $a^*a$ and $aa^*$ is positive, and finite sums of positive elements are positive, so $b\ge 0$. Put $R:=\|b\|_A$. If $R=0$, then $\|a^*a\|_A=0$ for every $a\in F$, hence $\|a\|_A^2=0$ by the C*-identity, so each $a$ is zero and again $e=0$ works.
Assume $R>0$. Define the scalar function
\begin{align*}
f:[0,R]\to[0,1],\qquad f(t):=\frac{t}{t+\eta}.
\end{align*}
This function is continuous, satisfies $f(0)=0$, and takes values between $0$ and $1$. The condition $f(0)=0$ is important in the nonunital case: continuous functional calculus for a positive element of a nonunital C*-algebra returns an element of the original algebra for functions vanishing at $0$. Define
\begin{align*}
e:=f(b)\in A.
\end{align*}
Because $0\le f\le 1$, the norm rule in continuous functional calculus gives $\|e\|_A\le 1$. To see positivity without relying on a slogan, define
\begin{align*}
q:[0,R]\to[0,1],\qquad q(t):=\sqrt{f(t)}.
\end{align*}
Then $q$ is continuous and $q(0)=0$. The multiplicative and involutive rules of functional calculus give
\begin{align*}
e=f(b)=q(b)^*q(b),
\end{align*}
so $e$ is positive.
We next estimate the right multiplication error. If $A$ has no unit, we work in the unitization $A^+$ and write $1_{A^+}$ for its unit. This is only a bookkeeping device: the element $a(1_{A^+}-e)=a-ae$ still belongs to $A$. Since
\begin{align*}
b-a^*a=\sum_{c\in F,\ c\ne a}c^*c+\sum_{c\in F}cc^*
\end{align*}
with the evident omission interpreted as zero when appropriate, the element $b-a^*a$ is positive. Multiplying this order inequality on the left and right by the self-adjoint element $1_{A^+}-e$ gives
\begin{align*}
0\le (1_{A^+}-e)a^*a(1_{A^+}-e)\le (1_{A^+}-e)b(1_{A^+}-e).
\end{align*}
The C*-identity gives
\begin{align*}
\|a-ae\|_A^2=\|a(1_{A^+}-e)\|_{A^+}^2=\|(a(1_{A^+}-e))^*a(1_{A^+}-e)\|_{A^+}.
\end{align*}
Therefore
\begin{align*}
\|a-ae\|_A^2\le \|(1_{A^+}-e)b(1_{A^+}-e)\|_{A^+}.
\end{align*}
Now we compute the last norm by functional calculus. Since $e=f(b)$, the elements $e$ and $b$ commute inside the commutative C*-subalgebra generated by $b$. Define
\begin{align*}
h:[0,R]\to[0,\infty),\qquad h(t):=t(1-f(t))^2=\frac{t\eta^2}{(t+\eta)^2}.
\end{align*}
The multiplicative rule for functional calculus gives
\begin{align*}
(1_{A^+}-e)b(1_{A^+}-e)=h(b).
\end{align*}
For every $t\in[0,R]$,
\begin{align*}
h(t)=\frac{t\eta^2}{(t+\eta)^2}\le \eta.
\end{align*}
Indeed, this is equivalent to $t\eta\le (t+\eta)^2$, which follows from $(t+\eta)^2-t\eta=t^2+t\eta+\eta^2\ge 0$. Hence the norm rule gives
\begin{align*}
\|h(b)\|_{A^+}\le \eta.
\end{align*}
Thus
\begin{align*}
\|a-ae\|_A^2\le \eta=\varepsilon^2.
\end{align*}
So $\|a-ae\|_A\le\varepsilon$.
The left multiplication estimate is not automatic from the right one unless the finite set is closed under adjoints, so we built $b$ with the extra terms $aa^*$. Since $b-aa^*$ is positive, the same order argument gives
\begin{align*}
\|a-ea\|_A^2=\|(1_{A^+}-e)aa^*(1_{A^+}-e)\|_{A^+}\le \|h(b)\|_{A^+}\le \eta.
\end{align*}
Therefore $\|a-ea\|_A\le\varepsilon$. If strict inequalities are desired, start the construction with a tolerance smaller than $\varepsilon$, for instance $\varepsilon/2$. This produces an element $e\in A$ that is positive, contractive, and two-sided $\varepsilon$-multiplicatively close to the identity on $F$.
[/guided]
[/step]
[step:Direct the finite-set approximants into a net]
Let $\Lambda$ be the set of all pairs $(F,\varepsilon)$, where $F\subset A$ is finite and $\varepsilon>0$. Define an order on $\Lambda$ by
\begin{align*}
(F,\varepsilon)\le (G,\delta)\quad \text{iff}\quad F\subseteq G \text{ and } \delta\le \varepsilon.
\end{align*}
This is a directed set: for $(F,\varepsilon),(G,\delta)\in\Lambda$, the pair
\begin{align*}
(F\cup G,\min\{\varepsilon,\delta\})
\end{align*}
dominates both.
For each $\lambda=(F,\varepsilon)\in\Lambda$, choose an element $e_\lambda\in A$ given by the previous step. Then $e_\lambda\ge 0$ and $\|e_\lambda\|_A\le 1$ for every $\lambda\in\Lambda$.
Fix $a\in A$ and $\alpha>0$. Let
\begin{align*}
\lambda_0:=(\{a\},\alpha).
\end{align*}
If $\lambda=(F,\varepsilon)\ge \lambda_0$, then $a\in F$ and $\varepsilon\le\alpha$, so the construction gives
\begin{align*}
\|a-ae_\lambda\|_A<\alpha
\end{align*}
and
\begin{align*}
\|a-e_\lambda a\|_A<\alpha.
\end{align*}
Therefore
\begin{align*}
ae_\lambda\to a
\end{align*}
and
\begin{align*}
e_\lambda a\to a
\end{align*}
in the norm of $A$. Thus $(e_\lambda)_{\lambda\in\Lambda}$ is a contractive positive approximate identity for $A$.
[/step]
[step:Repeat the construction inside a closed two-sided ideal]
Let $I\trianglelefteq A$ be a closed two-sided ideal. With the inherited operations, involution, and norm, $I$ is a C*-algebra. Applying the preceding construction to $I$ as the ambient C*-algebra gives a net $(u_\mu)_{\mu\in M}$ in $I$ such that each $u_\mu$ is positive in $I$, satisfies $\|u_\mu\|_I\le 1$, and, for every $x\in I$,
\begin{align*}
\|xu_\mu-x\|_I\to 0
\end{align*}
and
\begin{align*}
\|u_\mu x-x\|_I\to 0.
\end{align*}
Since the norm on $I$ is the restriction of the norm on $A$, this is the required contractive positive approximate identity contained in $I$.
Equivalently, the finite-set construction stays inside $I$ directly. If $F\subset I$ is finite, then for every $a\in F$ the elements $a^*a$ and $aa^*$ lie in $I$ because $I$ is a two-sided ideal of $A$. Hence
\begin{align*}
b=\sum_{a\in F}(a^*a+aa^*)\in I.
\end{align*}
The functional-calculus function $f$ satisfies $f(0)=0$, so $f(b)$ lies in the closed C*-subalgebra generated by $b$, and this subalgebra is contained in $I$. Therefore the approximants constructed above are elements of $I$. This proves the ideal version and completes the proof.
[/step]