In this link, it says that the gradient is as follow
The Gradient of the TV norm is $$ \mathrm{Grad}J(f)=\mathrm{div}\left(\frac{\nabla f}{\lVert\nabla f\rVert}\right). $$
From this other link, it also mentions that the derivative is as follow
Formally, we can write $\partial J(u)=-\mathrm{div}\left(\frac{\nabla u}{\lvert \nabla u\rvert}\right)$
I know how to calculate divergence, but I don't understand how the gradient of total variation is related to divergence.