From the Lagrangian in Maxwell theory
$$L = -\frac{1}{2}(\partial_{\mu} A_{\nu})(\partial^{\mu} A^{\nu}) + \frac{1}{2}(\partial_{\mu}A^{\mu})^2 - A_{\mu}J^{\mu}$$
I have to calculate $\frac{\partial L}{\partial (\partial_{\mu}A_{\nu})}$.
I understood that
$$\frac{\partial }{\partial (\partial_{\mu}A_{\nu})}\left(-\frac{1}{2}(\partial_{\mu} A_{\nu})(\partial^{\mu} A^{\nu}) \right) = -\partial^{\nu}A^{\mu}.$$
I don't get the second part though:
$$\frac{\partial}{\partial (\partial_{\mu}A_{\nu})}\left(\frac{1}{2}(\partial_{\mu}A^{\mu})^2\right) = (\partial_{\rho}A^{\rho})\eta^{\mu\nu}.$$
I am still surfing thought the indexes and tensor manipulations in derivatives and so on, but here I got stuck. Where does the metric (flat spacetime) tensor comes out from?