Bethe approximation for a three spin cluster

I'm having trouble understanding the Bethe approximation, could someone please explain to me how you go from the Ising model with

$\mathcal{H}= -J\sum_{\langle i,j \rangle}\sigma_i\sigma_j - h\sum_i\sigma_i$

to

$\mathcal{H}=-J(\sigma_1\sigma_0+\sigma_2\sigma_0)-(Jm+h)(\sigma_1+\sigma_2)-h\sigma_0$

How is the summation with $\langle i,j\rangle$ performed?

In the Bethe approximation, one considers explicitly a small cluster consisting of one "central" spin and its nearest neighbours. The spins further out from the central one are replaced by their mean-field values $m$. This can be taken to be a constant, but as-yet-undetermined value. Now, the energy of the small cluster, in its surroundings of fixed mean-field spins, is written down, and from this the statistical mechanics of the small cluster of explicit spins can be worked out in detail. The value of $m$ is determined self consistently. I won't go through that part in detail: from your question, it looks like you are just troubled by this first step.
Your second equation gives the energy for this small cluster, for a very simple example: the one dimensional Ising model. The central spin is labelled $0$, and its neighbours labelled $1$ and $2$. The interactions $J$ between $0$-$1$ and $0$-$2$ are given explicitly, as are the $J$ interactions between the neighbours $1$ & $2$ and the mean field spins $m$ which are outside them. Also the external field terms $h$, acting on all three explicit spins, appear. That's all you need to compute the partition function for the three spin cluster, surrounded by the mean field.
So the answer to your question is that the pair sum is not performed in entirety: just the part corresponding to the small cluster embedded in a surrounding mean field. Or, if you prefer, all the terms in the sum over neighbouring pairs are included, but the spin values for those spins not included explicitly in the cluster are set equal to $m$, and this gives a large number of constant terms in the sum, which can be dropped as they will not affect the final result. That's the nature of the approximation.