This is done exactly as said. Hit a barrel to have it ignite and pick it up and hold it until it explodes. It could take several explosions to kill you so it would be easier to have your HP as low as possible before attempting unless there are multiple barrels.