Yes, Belzebub is forced to break the loop by choosing to apply
Rest in Peace first, and will thus eventually be forced to empty his library.
Belzebub can choose to put any number of cards from the top to the bottom of his or her library before breaking the loop, but whether it's ten or twenty or seventy billion, he's still going to end up with an empty library. Just as with the
lifegain loop scenario, he's not allowed to waste time with meaningless continuations of the loop.