Let $\Bbb X$ be an outcome space and let $\{P_{\theta} : \theta \in \Theta\}$ be a class of probability distributions on $\Bbb X$. Let $X$ be an observed outcome generated by $P_{\theta}$ for some $\theta$ that is unknown to us. We want to estimate $g(\theta)$ for a function $g$ on $\Theta$ using some decision rule $\delta$. Show that for any decision rule $\delta$, the estimation error $\Bbb E_{\theta}[(g(\theta) - \delta(X))^2] = (\text{Bias}_{\theta}(\delta))^2 + \text{Var}_{\theta}(\delta)$ where $$\text{Bias}_{\theta}(\delta) \equiv g(\theta) - \Bbb E_{\theta}[\delta(X)] \text{ and }\text{Var}_{\theta}(\delta) \equiv \Bbb E_{\theta}[(\Bbb E_{\theta}[\delta(X)] - \delta(X))^2]$$
I first set them equal and simplify to get:
$$\Bbb E_{\theta}[g(\theta)^2] - 2 \Bbb E_{\theta}[g(\theta)\delta(X)] + \Bbb E_{\theta}[\delta(X)^2] $$ $$=$$ $$g(\theta)^2 - 2g(\theta) \Bbb E_{\theta}[\delta(X)] + \Bbb E_{\theta}[\delta(X)]^2 + \Bbb E_{\theta}[\delta(X)]^2 - 2 \Bbb E_{\theta}[\delta(X)]^2 + \Bbb E_{\theta}[\delta(X)^2]$$
Then I reduce again to get:
$$\Bbb E_{\theta}[g(\theta)^2] - 2 \Bbb E_{\theta}[g(\theta)\delta(X)] = g(\theta)^2 - 2g(\theta) \Bbb E_{\theta}[\delta(X)]$$
But from here I can't see how to proceed.
Does anyone have any ideas?