I am wondering if its possible to obtain an analytic expression for the gradient of $$f(B) = (A - B)\left[(A - B)'(A - B)\right]^{-\frac{1}{2}}$$ with respect to $B$ where $A \in \mathbb{R}^{s \times t}$, $B \in \mathbb{R}^{s \times t},$ and $(A - B)$ has rank $t$ and $t$ distinct singular values.
Trying to vectorize the expression (since gradient of vector with respect to vector has analytic form): $$ {\rm vec}\left(A\left[(A - B)'(A - B)\right]^{-\frac{1}{2}}\right) - \left(\left[(A - B)'(A - B)\right]^{-\frac{1}{2}} \otimes I\right) {\rm vec}(B),$$ but since $B$ cannot be vectorized inside the square root, I'm not sure how (or if its possible to) proceed.
Any insight would be appreciated!