The following identity is an abstract version of the Spitzer's formula introduced in Wendel's 1958 paper [1] and the proof thereof, with some simplifications.
Theorem. Let $\mathcal{A}$ be a unital Banach algebra with the norm $\|\cdot\|$ and unit $1$. Let $\mathbf{P}$ be a bounded linear operator on $\mathcal{A}$ satisfying the following conditions:
- $\mathbf{P}$ is a projection, that is, $\mathbf{P}^2 = \mathbf{P}$.
- Both $\operatorname{im}\mathbf{P}$ and $\operatorname{im}(\mathbf{I}-\mathbf{P})$ are closed subalgebras of $\mathcal{A}$.
- $x$ and $\mathbf{P}x$ commute for any $x \in \mathcal{A}$.
Proof. Write $\mathbf{Q} = \mathbf{I} - \mathbf{P}$ for simplicity. We first note that, for any scalars $a_n$'s and $b_n$'s and $x \in \mathcal{A}$, $$ \mathbf{Q} \left[ \sum_{n=0}^{\infty} a_n (\mathbf{P}x)^n \right] = \mathbf{Q}a_0 \qquad\text{and}\qquad \mathbf{P} \left[ \sum_{n=0}^{\infty} b_n (\mathbf{Q}x)^n \right] = \mathbf{P}b_0 \tag{1} $$ provided the respective series converges. Now let $t$ be sufficiently small so that all the series appearing in $\text{(*)}$ converges absolutely, and let $g$ denote the left-hand side of $\text{(*)}$: $$ g = \sum_{n=0}^{\infty} t^n (\mathbf{P}\mathbf{M}_a)^n 1 = (\mathbf{I} - t \mathbf{P}\mathbf{M}_a)^{-1} 1 $$ Hence, $g$ is uniquely determined by the equation $$ (\mathbf{I} - t \mathbf{P}\mathbf{M}_a) g = 1. \tag{2} $$ In light of the above observation, it suffices to prove that the right-hand side of $\text{(*)}$ satisfies the condition $\text{(2)}$. Indeed, let $g^*$ denote the right-hand side of $\text{(*)}$: $$ g^* = \exp\left(\sum_{n=1}^{\infty} \frac{t^n}{n} \mathbf{P}(a^n) \right) = \exp\left(- \mathbf{P} \log(1 - ta) \right) $$ Then we get \begin{align*} (\mathbf{I} - t \mathbf{P}\mathbf{M}_a) g^* &= \mathbf{Q}g^* + \mathbf{P}(\mathbf{I} - t\mathbf{M}_a)g^* \\ &= \mathbf{Q}g^* + \mathbf{P}((1 - ta)g^*) \\ &= \mathbf{Q}\exp\left( -\mathbf{P} \log(1 - ta) \right) + \mathbf{P} \exp\left( \mathbf{Q} \log(1 - ta) \right) \\ &= \mathbf{Q}1 + \mathbf{P}1 \\ &= 1. \end{align*} In the third step, we utilized the fact that $e^x e^y = e^{x+y}$ provided $x$ and $y$ commute. Then $\text{(1)}$ is used in the fourth step. Therefore $g^* = g$. $\square$
References.
[1] Wendel, James G. (1958). "Spitzer's formula: A short proof". Proceedings of the American Mathematical Society. 9 (6): 905–908. doi:10.1090/S0002-9939-1958-0103531-2. MR 0103531.