We establish an energy quantization result for sequences of Willmore surfaces when the underlying sequence of Riemann surfaces is degenerating in the moduli space. We notably exhibit a new residue which quantifies the potential loss of energy in collar regions. Thanks to these residues, we also establish the compactness (modulo the action of the Möbius group of conformal transformations of R 3 ∪ {∞}) of the space of Willmore immersions of any arbitrary closed 2-dimensional oriented manifold into R 3 with uniformly bounded conformal class and energy below 12π.