Existence of polynomials in the Diagonal-nilpotent decomposition of a matrix 
Let $V$ be a finite dimensional vector space over $\mathbb{C}$ and $T: V \rightarrow V$ linear operator. Show that there exist polynomials, without constant terms, $g, h \in \mathbb{C}$ such that $g(T)=D_T$ and $h(T)=N_T$, where $D_T$ is a diagonalizable matrix and $N_T$ nilpotent matrix such that $T=D_T+N_T$ and $D_TN_T=N_TD_T$.

I have proved that $D_T$ and $N_T$ actually exist by using Jordan Canonical form and now I want to show the existence of the polynomials described above.
I want to use the following result to prove the claim: If $f_T=\prod_{i=1}^{r}(t-\lambda_i)^{e_i}$ in $F[t]$ and all the $\lambda_i$ are distinct, then there exists a polynomial $P \in F[t]$ such that $(t-\lambda_i)^{e_i}\mid (P-\lambda_i)$ for all $i$ and $t \mid P$ in $F[t]$. From this result I know that $f_T \mid \prod_{i=1}^{r}(P-\lambda_i)$ and $t^r \mid P^r$. But I don't know how to proceed, any ideas?
 A: 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.
A: I would like to make a small edit to EuYu's solution. Namely: Let $m_0(x)$ denote the minimal polynomial of $T$. If $x|m_0$, then let $m = m_0$. Otherwise, let $m=xm_0$. This ensures that 0 is one of the distinct $\lambda_i$'s. WLOG let $\lambda_1 = 0$. Then for each $i>1$, $x|f_i$. Hence, $g(x) = \sum_{i=1}^r \lambda_ip_i(x)f_i(x) = \sum_{i=2}^r \lambda_ip_i(x)f_i(x)$ is divisible by $x$. 
This should fix the issue I hard with his solution.
