Let $M$ be a positive definite matrix in $\mathbb{S}_+^n$. Let $\log$ be natural matrix logarithm which $\log(M)$ is defined as $\log(M)=\sum_{i=1}^{n}\log(\lambda_i)v_iv_i^T$ where $(\lambda_i,v_i)$ are eigenpairs of $M$.
This function is called negative Von Neumann entropy or negative Quantum entropy.
How can we show the derivative of $f(M)=\text{Tr}(M\log M -M)$ is $\log M?$
Since $M\in\mathbb{S}_+^n$, there must exist a orthogonal matrix $U$ and a diagonal matrix $\Lambda=\text{diag}\left\{\lambda_1,\lambda_2,...,\lambda_n\right\}$, with each $\lambda_j>0$, such that $$ M=U\Lambda U^{\top}. $$ Hence, using the definition of $\log M$, \begin{align} M\log M-M&=\left(U\Lambda U^{\top}\right)\left(U\log\Lambda\,U^{\top}\right)-U\Lambda U^{\top}\\ &=U\left(\Lambda\log\Lambda-\Lambda\right)U^{\top}. \end{align} Consequently, \begin{align} f(M)&=\text{tr}\left(M\log M-M\right)\\ &=\text{tr}\left(U\left(\Lambda\log\Lambda-\Lambda\right)U^{\top}\right)\\ &=\text{tr}\left(\left(\Lambda\log\Lambda-\Lambda\right)U^{\top}U\right)\\ &=\text{tr}\left(\Lambda\log\Lambda-\Lambda\right)\\ &=\sum_{j=1}^n\lambda_j\left(\log\lambda_j-1\right). \end{align} Therefore, it follows that $$ {\rm d}f(M)=\sum_{j=1}^n\log\lambda_j\,{\rm d}\lambda_j=\text{tr}\left(\log\Lambda\,{\rm d}\Lambda\right). $$
On the other hand, \begin{align} \log M\,{\rm d}M&=\left(U\log\Lambda\,U^{\top}\right){\rm d}\left(U\Lambda U^{\top}\right)\\ &=\left(U\log\Lambda\,U^{\top}\right)\left({\rm d}U\Lambda U^{\top}+U{\rm d}\Lambda\,U^{\top}+U\Lambda\,{\rm d}U^{\top}\right)\\ &=U\log\Lambda\,U^{\top}\,{\rm d}U\Lambda U^{\top}+U\log\Lambda\,{\rm d}\Lambda U^{\top}+U\log\Lambda\,\Lambda\,{\rm d}U^{\top}. \end{align} Take the trace of both sides, and the first and the last term on the right-hand side cancel out (to be explained soon). Thus we obtain \begin{align} \text{tr}\left(\log M\,{\rm d}M\right)&=\text{tr}\left(U\log\Lambda\,{\rm d}\Lambda U^{\top}\right)\\ &=\text{tr}\left(\log\Lambda\,{\rm d}\Lambda U^{\top}U\right)\\ &=\text{tr}\left(\log\Lambda\,{\rm d}\Lambda\right)\\ &={\rm d}f(M). \end{align} This result implies that, in the form, $$ \frac{\partial}{\partial M}f(M)=\log M. $$
In this appendix, let us explain the cancel-out of the two traces. In fact, \begin{align} \text{tr}\left(U\log\Lambda\,U^{\top}\,{\rm d}U\Lambda U^{\top}\right)&=\text{tr}\left({\rm d}U\Lambda U^{\top}\,U\log\Lambda\,U^{\top}\right)\\ &=\text{tr}\left({\rm d}U\Lambda\log\Lambda\,U^{\top}\right)\\ &=\text{tr}\left({\rm d}U\log\Lambda\,\Lambda\,U^{\top}\right)\\ &=\text{tr}\left(\log\Lambda\,\Lambda\,U^{\top}{\rm d}U\right)\\ &=-\text{tr}\left(\log\Lambda\,\Lambda\,{\rm d}U^{\top}\,U\right)\\ &=-\text{tr}\left(U\log\Lambda\,\Lambda\,{\rm d}U^{\top}\right), \end{align} where we have repeatedly used the identity $$ \text{tr}\left(AB\right)=\text{tr}\left(BA\right) $$ for square matrices $A$ and $B$, the orthogonality $$ U^{\top}U=UU^{\top}=I_n, $$ and its differentiation $$ \mathbf{0}={\rm d}\left(U^{\top}U\right)={\rm d}U^{\top}\,U+U^{\top}\,{\rm d}U. $$