This is probably not the proof you had in mind, but let me offer another. The result you want is really a consequence of the primary decomposition theorem. Let $m(x)$ denote the minimal polynomial of $T$, which we will write as
$$m(x)=\prod_{i=1}^r(x-\lambda_i)^{e_i},$$
where $\lambda_i$ are the distinct eigenvalues of $T$. Since the primary factors $f_i(x)=m(x)/(x-\lambda_i)^{e_i}$ are collectively coprime, by Bezout's lemma we have polynomials $p_i(x)$ for which
$$1 = \sum_{i=1}^r p_i(x)f_i(x).$$
The operators $\Pi_i=p_i(T)f_i(T)$ will allow us to define the diagonalizable part of $T$ as
$$D_T = \sum_{i=1}^r\lambda_i\Pi_i,$$
and the nilpotent part of $T$ as
$$N_T = \sum_{i=1}^r(T-\lambda_i)\Pi_i = T-D_T.$$
You can easily verify that $D_T$ and $N_T$ are actually diagonalizable and nilpotent respectively. It's also easy to see that they are defined as polynomials in $T$, explicitly
$$g(x) = \sum_{i=1}^r\lambda_i p_i(x)f_i(x),$$
and
$$h(x) = \sum_{i=1}^r(x-\lambda_i)p_i(x)f_i(x).$$
It remains to prove that the two polynomials have no constant terms, or equivalently, $x\mid g$ and $x\mid h$. Note that since $g+h = x$, it suffices to prove just $x\mid h$. But $h(T)$ is nilpotent, in particular $h(T)^e = 0$ where $e$ is the largest exponent $e_i$ in $m$. This means that we must have $x^e\mid h^e$ and in particular $x\mid h$, as required.
Appendix: Proof that $D_T$ and $N_T$ are actually diagonalizable and nilpotent.
First, we must establish a few facts on the operators $\Pi_i$ we previously defined. Note that the operators $\Pi_i$ are polynomials in $T$ so they commute pairwise. But more than that, if $i\neq j$ then we necessarily have $m\mid f_if_j$, which means that
$$\Pi_i\Pi_j = \Pi_j\Pi_i = 0.$$
Since we have
$$I = \sum_{i=1}^r \Pi_i,$$
it follows that
$$\Pi_j = \sum_{i=1}^r\Pi_i\Pi_j = \Pi_j^2,$$
so that $\Pi_i$ are a family of projection operators. Establishing this will allow us to calculate products of $D_T$ and $N_T$ very easily.
In particular, this gives us
$$N_T^k = \sum_{i=1}^r(T-\lambda_i)^k\Pi_i,$$
which will be zero for $k\ge e$, where $e$ is the largest exponent in the minimal polynomial, since each term $(T-\lambda_i)^k\Pi_i$ will then hold a factor of $m(T) = 0$. This proves that $N_T$ is nilpotent.
Likewise, consider the term
$$\lambda_jI - D_T = \sum_{i=1}^r(\lambda_j-\lambda_i)\Pi_i,$$
which is linear combination of all the projectors except the $j$th. If we take a product of two such terms, with distinct eigenvalues, then we will have
$$(\lambda_jI - D_T)(\lambda_kI - D_T) = \sum_{i=1}^r(\lambda_j-\lambda_i)(\lambda_k-\lambda_i)\Pi_i,$$
which will eliminate the $j$th and $k$th projectors. Continuing, we see that the polynomial
$$\mu(x) = \prod_{i=1}^r(x-\lambda_i)$$
must be the minimal polynomial for $D_T$. Since $\mu$ splits into distinct linear factors, it follows that $D_T$ is diagonalizable.