I need a reference for a theorem that states: Let $D$ be a domain of $\mathbb{R}^{m}$ and let $K(x)= \log|x|$ if $m=2$, and $K(x)=|x|^{2-m}$ if $m>2$. Let $u$ be a subharmonic function on $D$. Then there is a unique Borel measure $\mu$ such that for all compact $E$ in $D$ we have $$u(x)=\int_{\partial E}u(\zeta)d\omega_{x}(\zeta)-\int_{E}K(x-\zeta)d\mu(\zeta),$$ where $\omega_{x}$ is the harmonic measure at $x$.
In Hayman and Kenney's book ("subharmonic functions", vol. 1 Theorem 3.9, pg 104) this theorem is given but instead of the first integral, they give a function $h$ harmonic in the interior of $E$ only. Also, on pg 120, the explicit form of the first integral is given but the integrand of the second integral is the green function $g$.
Same things in Armitage and Gardiner's book ("Classical potential theory"). I would appreciate if someone could give me a reference or explain how to go from one form to the other.