A paper I'm currently reading uses the following fact. If $A$ is a unital $C^*$-algebra, $P=P^2\in A$, then there are $T, F\in A$ s.t. $F$ is an orthogonal projection ($F=F^*=F^2$) and $$P=F+FT(1-F).\tag{1}$$
The question:
Since no proof or further reference is given, I assume, that this fact is obvious from some point of view. Is it? What do I have to learn, so the similar facts would be obvious for me?
P.S. Here is a proof I came up with after some trial and error.
We would like to define $F=f(PP^*)$, where $f(x)=0$ if $x=0$ and $f(x)=1$ otherwise. To check, that $F$ is well-defined we need to check, that $f$ is continuous on the spectrum of $PP^*$. To do this it is enough to show, that the open interval $(0,1)$ doesn't intersect with its spectrum or, equivalently, that $(2PP^*-1)^2\geq 1$. Expanding we see, that this is equivalent to $PP^*PP^* \geq PP^*$.
Define $A=P-P^*$. Then $A^*A\geq 0$. On the other hand expanding we get $A^*A=PP^*+P^*P-P-P^*$, so $PP^*+P^*P\geq P+P^*$. Multiplying by $P$ on the left and by $P^*$ on the right we get $PP^* + PP^*PP^*\geq 2 PP^*$ or $PP^*PP^*\geq PP^*$. Thus $F=f(PP^*)$ is indeed well defined.
Since $f(x)$ is real valued and $f(x)=f(x)^2$ we have $F=F^*=F^2$. To show, that $FP=P$ notice, that $f(x)x=x$ for $x\geq 0$. Therefore $FPP^*=PP^*F=PP^*$ and $(FP-P)(FP-P)^*=(F-1)PP^*(F-1)=0(F-1)=0$. Thus indeed $FP=P$.
Thus we have $$P=F+(P-F)=F+F(P-1).$$
Finally, notice, that $(P-1)F=(P-1)PP^*F=0P^*F=0$, so $P-1=(P-1)(1-F)$ and $$P=F+F(P-1)(1-F).$$