A slightly different approach.
Let $f\in C^1(\Bbb R^n\times \Bbb R^m,\Bbb R^\ell)$, then it is easy to check that
$$\partial f(x,y)(a,b)=D_x f(x,y)a+D_y f(x,y)b\tag1$$
where $\partial f$ is the Fréchet derivative of $f$ and $D_x f$ is the Fréchet derivative of $f(\cdot,y)$. Similarly $D_y f$ is the Fréchet derivative of $f(x,\cdot)$.
Let $d:\Bbb R^n\times \Bbb R^n\to\Bbb R$ a dot product, hence
$$\partial\, d(x,y)(a,b)=D_x d(x,y)a+D_y d(x,y)b\tag2$$
Now note that the functions $d(\cdot ,y)$ and $d(x,\cdot)$ are linear, so
$$D_x d(x,y)=d(\cdot, y)\implies D_x d(x,y)a=d(a,y)\tag3$$
And similarly $D_y d(x,y)b=d(x,b)$. Putting all together we find that
$$\partial\, d(x,y)(a,b)=d(a,y)+d(x,b)\tag4$$
By last, using the chain rule, we have that
$$\partial\, [d(f,g)]=\partial d(f,g)\partial(f,g)=\partial d(f,g)(f',g')\\=d(f',g)+d(f,g')\tag5$$
The key points here are $(1)$ and the fact that if $A$ is a linear function then $\partial Ax=A$, what can be checked easily using the definition of Fréchet derivative.