  We study the $\theta$ dependence of the free energy density of the
four-dimensional SU(2) Yang-Mills theory at zero and high temperatures with
lattice numerical simulations. The subvolume method to create a $\theta \neq 0$
domain in the lattice configurations enables us to successfully calculate the
energy density up to $\theta \sim 3\pi/2$. At high temperatures we obtain
results predicted by the instanton computations. By contrast at zero
temperature we find that the theory exhibits spontaneous CP breaking at $\theta
= \pi$ in accordance with the large $N$ prediction. We therefore conclude that
the SU(2) Yang-Mills theory is in the large $N$ class. The surface tension of
the $\theta\ne 0$ domain turns out to be negative at $T=0$.
