Let $A$ be a $n\times n$ matrix over the field $F$. If the characteristic of $F$ is $0$, then $$A=\left(A-\dfrac{1}{n}\mathrm{trace}(A)\mathrm{I}_n\right)+\dfrac{1}{n}\mathrm{trace}(A)\mathrm{I}_n$$ in which $\mathrm{trace}(A)$ means the trace of $A$ and $\mathrm{I}_n$ is the identity. Then, obviously, the trace of $A-\dfrac{1}{n}\mathrm{trace}(A)\mathrm{I}_n$ is $0$, and thus it is a traceless matrix. Therefore, $A$ is a sum of a scalar matrix and traceless matrices.
However, when the characteristic of $F$ is not $0$, I do not know anything about such as decomposition. Any counterexample or reference or technique is very much appreciated. Thank you in advance.