Freezing will not hurt the honey in the least. Overnight is probably okay, but I usually freeze for 24 hours just to be safe. If the beetles have slimed up the honey, it's not going to be palatable though. If the capped honey seems wet -- and I mean actually wet and slimy to the touch, not the depressed cappings with no air pocket that people call "wet" in cut comb -- and if the honey is very runny, smells like rotting oranges, or is fermented, then the beetles have ruined it, and it's not good for anything that I'm aware of.