Undirected graphical models with for discrete variables with hidden nodes - loglikelihood (The elements of statistical learning) I don't understand the equation of loglikelihood of the observed data in graphical models with hidden nodes that appears in "The Elements of Statistical Learning" (Hastie, Tibshirani, Friedmann, chapter 17.4.2)

In the equation we sum over possible values of $x_h$, but $x_h$ doesn't appear anymore in the equation. Where does this sum come from? 
 A: This is a special case of the law of total probability. (See also the second equation of slide 5.)
Specifically the lower-case $x_{\mathcal{H}}$ you mention are supposed to refer to all possible/states values of the hidden random variables $X_{\mathcal{H}}$. To quote the authors:

The sum over $x_{\mathcal{H}}$ means that we are summing over all possible $\{0,1\}$ values for the hidden units.

It is a common (albeit somewhat ambiguous) practice to refer to the (possible) values of a random variable denoted with an upper-case letter, e.g. $T, X, Y, Z$, using the corresponding lower-case letters, e.g. $t, x, y, z$ respectively. This allows us to talk about the event $\{ Y = y\}$ or the probability that the random variable $Y$ equals the value $y$, $\mathbb{P}(Y=y)$, without specifying which specific value $y$ we should consider. This is helpful when the particular value $y$ doesn't matter.
In this case, since we are summing over all possible values of the random variable(s) $X_{\mathcal{H}}$, every value in the sum is in some sense 'arbitrary', making the lower-case $x_{\mathcal{H}}$ convention for 'any particular value' of the random variable(s) $X_{\mathcal{H}}$ applicable here.
