For a nilpotent operator $N : V \to V$ of index $m \in \mathbb{N}$ and an analytic function $f(z) = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!}z^n$ we can define $$f(N) = \sum_{n=0}^{m-1} \frac{f^{(n)}(0)}{n!}N^n$$
For an arbitrary linear map $A : V \to V$ with the minimal polynomial $(x - \lambda_1)^{p_1}(x - \lambda_2)^{p_2}\cdots (x - \lambda_k)^{p_k}$, the space $V$ admits the decomposition into generalized eigenspaces:
$$V = \ker (A - \lambda_1I)^{p_1} \dot+ \ker (A - \lambda_2I)^{p_2} \dot+ \cdots \dot+ \ker (A - \lambda_kI)^{p_k}$$
Notice that restricting $A$ to $\ker (A - \lambda_iI)^{p_i}$ we can write $A_i = A|_{\ker (A - \lambda_iI)^{p_i}}$ in the form
$$A_i = \lambda_i I_i + N_i$$
where $I_i$ is the identity on $\ker (A - \lambda_iI)^{p_i}$, and $N_i = A_i - \lambda_i I_i$, which is a nilpotent map of index $p_i$.
Therefore, having in mind Taylor's formula
$$f(z) = \sum_{n=0}^\infty \frac{f^{(n)}(\lambda)}{n!} (z - \lambda)^n$$
we can define $$f(A_i) = f(\lambda_i I + N_i) = \sum_{n=0}^{p_i-1} \frac{f^{(n)}(\lambda)}{n!} N_i^n$$
So finally, for $A = A_1 \dot+ A_2 \dot+ \cdots \dot+ A_k$ we define
$$f(A) = f(A_1) \dot+ f(A_2) \dot+ \cdots \dot+ f(A_k)$$
Note that all definitions are in fact valid when $f$ is a polynomial, so this is simply a direct generalization to power series.