Obviously this didn’t actually happen. Darth Vader’s life support system was disabled by Cylo IV and all of this happened inside his head. I guess it’s supposed to be some sort of symbolic memory where Darth Vader consumed Anakin Skywalker.
From – Star Wars: Darth Vader #24