I am trying to understand some calculations to get the excitation energy $\Delta E_\text{M} = E_\text{M} - E_0$ (M is the number of domain walls) in the 1d Ising model in the absence of a magnetic field:
$$ H = - J\sum_{i=1}^N s_i s_{i+1} $$
As far as I know, you can take two approaches -- open boundary conditions and periodic boundary conditions. Open boundary conditions means that the Hamiltonian becomes
$$ H_\text{OBC} = - J ( s_1 s_2 + s_2 s_3 + \dots + s_{N-1} s_N )$$
while the periodic boundary conditions lead to
$$ H_\text{PBC} = - J ( s_1 s_2 + s_2 s_3 + \dots + s_{N-1} s_N + s_N s_1 ) .$$
This leads to different ground state energies
$$ E_{0, OBC} = - J ( N - 1 )$$
and
$$ E_{0, PBC} = - J N .$$
If I understood everything correctly, every domain will contribute an energy $- (L_i - 1) J$ (where $L_i$ are just the number of spins in the domain $i$) plus an additional $+J$ per domain wall in the OPC leading to
$$ E_{M, OPC} = - J \sum_{i=1}^M (L_i - 1) + J M = - JN + 2JM = E_{0, OPC} + \Delta E_{M, OPC} $$
but in the PBC, I would get an energy $- J L_i$ per domain plus $0$ per domain wall since the energy contribution is $\propto - JN$. This leads to
$$ E_{M, PBC} = - J \sum_{i=1}^M L_i = - JN = E_{0, PBC} $$
I am really confused by this and I feel like I've mixed things up quite a lot. I was expecting both results to match (or at least to match in thermodynamic limit).