A part of an objective function is:
$$F=\|H-\mu_H\|_F^2$$
And we have:
$$\mu_H=\frac{\Sigma H}{n_H}$$
In fact, $\mu_H$ is the average of $H$ in one dimension and is repeated $n$ times in which all columns are the same.
How can I take the derivative of $F$ with respect to $H$ i.e. $\frac{\partial F}{\partial H}$?
Your function can be written as $F(H) = f(g(H))$, where $$ f(H) = \|H\|_F^2, \quad g(H) = H - \mu_H = H - \frac 1n Hee^T $$ where $e = (1,\dots,1)^T$. The total derivatives of these functions are given by $$ df(H)(K) = 2\operatorname{Tr}(H^TK), \quad dg(H)(K) = g(K). $$ With the chain rule, we have $$ d(f \circ g)(H)(K) = [df(H) \circ dg(H)](K)\\ = df(H)(g(K)) = df(H)\left(K - \frac 1n Kee^T\right)\\ = 2\operatorname{Tr}\left( H^T\left(K - \frac 1n Kee^T\right)\right)\\ = 2\operatorname{Tr}(H^TK) - \frac 2n\operatorname{Tr}((Hee^T)^TK)\\ = 2 \operatorname{Tr}\left( \left(H - \frac 1n Hee^T \right)^TK\right)\\ = 2 \operatorname{Tr}(g(H)^TK) $$ In "denominator layout", this derivative is given by $\frac{\partial F}{\partial H} = 2g(H)$.