Solution (source code)

= Solution

Since
$$
\mathbb E_{\theta\mid y}(y-\theta)^2
=(y-\widetilde\theta)^2+\sigma_\theta^2,
$$
we obtain
$$
\boxed{
\mathbb E_{\theta\mid y}\log L(\theta)
=-\frac12\log(2\pi\sigma^2)
-\frac{(y-\widetilde\theta)^2+\sigma_\theta^2}{2\sigma^2}}.
$$