Let X is a Banach space, and $ A\in B(X) $. Suppose also that $ \sigma (A) = F_1\cup F_2 $ with F's disjoint components.
Then we can let $ G_1 G_2 $ be disjoint nbhds of F_j's respectively, and consider $ C_1 C_2 $ closed curves in G_i and surrounding F_1 respectively. Then we have
$ A= \frac {1}{2 \pi i} \int_{C_1} (z-A)^{-1}z dz + \frac{1}{2 \pi i} \int_{C_2} (z-A)^{-1}z dz = A_1 + A_2 $
Now it is not to hard to show that $ X=X_1 \oplus X_2 $ with $ A_j:X_j \to X_j $