Hi there! The best strategy is to hide in a chest the moment he appears, and wait until he goes away. You need to utilize the portals to find two keys to unlock the doors. You're very close to the end of the game, don't give up!