Partial differentiation of the absolute value of a function containing complex coefficients. I have a function, $H$, which is a dependent on a number of parameters, $\theta_{i=1,\ldots,n}$ and a number of complex coefficients. The function hence gives a complex quantity. $H$ is relatively simple to differentiate w.r.t $\theta_i$.
What I am interested in finding is,
\begin{equation}
\sum_i \left| \frac{\partial|H|}{\partial \theta_i} \right|^2
\end{equation}
Here is where I am unsure of myself: Because H is a function of theta
\begin{equation}
\frac{\partial|H|}{\partial \theta_i} = \frac{\partial|H|}{\partial H}\frac{\partial H}{\partial \theta_i}
\end{equation}
My question is: How do I calculate the differential of $|H|$ w.r.t $H$, given that H is complex (I think that this differential is undefined everywhere except zero?)
Is there another way of expanding this in a form where I can calculate the differential.
Note: although I can calculate dH/dtheta, it is difficult to directly calculate d(abs(H))/dtheta. 
Many thanks in advance. 
Edit
If you will indulge me for one more question,
Am I right in saying:  
\begin{equation}
\frac{\partial H_R}{\partial \theta_i} = 0.5 \left(\frac{\partial H}{\partial \theta_i}  + \frac{\partial \overline{H}}{\partial \theta_i}  \right)
\end{equation}
So that I can use the partial differentials I have already calculated?
 A: For a complex function $f(H)$, its derivative is defined as
$$f'(H)=\lim_{\Delta H\to 0}\frac{f(H+\Delta H)-f(H)}{\Delta H}$$
if the limit exists.  
If $f(H)=|H|$, we have
$$\begin{align}
f'(H)&=\lim_{\Delta H\to 0}\frac{|H+\Delta H|-|H|}{\Delta H}\\\\
&=\lim_{\Delta H\to 0}\frac{H \Delta \bar H+\bar H \Delta  H+|\Delta H|^2}{\Delta H \left(|H+\Delta H|+|H|\right)}\\\\
\end{align}$$
which exists nowhere.
Therefore, we conclude that the function $|H|$ is nowhere differentiable.  

Now, suppose that $H$ is a complex function of real variables, $\theta_i$, $i=1,\cdots,n$.  Then, we can write
$$H(\vec \theta)=H_R(\vec \theta)+H_I(\vec \theta)$$
where $H_R$ and $H_I$ represent the real and imaginary parts of $H$, respectively.  We can find the partial derivatives of $|H|$ as 
$$\begin{align}
\frac{\partial |H(\vec \theta)|}{\partial \theta_i}&=\frac{\partial \sqrt{H_R^2(\vec \theta)+H_I^2(\vec \theta)}}{\partial \theta_i}\\\\
&=\frac{H_R(\vec \theta)\frac{\partial H_R(\vec \theta)}{\partial \theta_i}+H_I(\vec \theta)\frac{\partial H_I(\vec \theta)}{\partial \theta_i}}{\sqrt{H_R^2(\vec \theta)+H_I^2(\vec \theta)}}\\\\
&=\frac{H_R(\vec \theta)}{|H(\vec \theta)|}\frac{\partial H_R(\vec \theta)}{\partial \theta_i}+\frac{H_I(\vec \theta)}{|H(\vec \theta)|}\frac{\partial H_I(\vec \theta)}{\partial \theta_i}
\end{align}$$
