The Mind of Madness

Dervenin wants his master Sheogorath to return from vacation. At the end of the quest the Dragonborn is rewarded with the daedric artifact, Wabbajack.

Overview
"Dervenin wants me to talk to his master about returning from vacation. To do so, I need to gain entrance to the Pelagius Wing of the Blue palace."

- The Dragonborn

Objectives

 * Gain access to the Pelagius Wing of the Blue Palace.
 * Use the key to gain access to the Pelagius Wing.
 * Search for Dervenin's master in the Pelagius Wing.
 * Use the Wabbajack to escape the mind of Pelagius III.

Quick walkthrough

 * Listen to rumors at The Winking Skeever in Solitude about a man *wandering the streets around the Blue Palace, or encounter him on the street.
 * Speak to Dervenin wandering around Solitude and agree to help him.
 * Go to the Blue Palace and get a key to the Pelagius Wing by talking to Erdi or Una in the servants quarters, or after clearing out Wolfskull Cave, speak to Falk Firebeard.
 * Walk through the Pelagius Wing until being transported into Pelagius’ mind.
 * Speak to Sheogorath and complete the three curing tasks:
 * For paranoia: Using the Wabbajack, shoot the two men on the opposite side of the arena.
 * For night terrors: Shoot the sleeping Pelagius with the Wabbajack and then the creature that spawns, repeat until he wakes up.
 * For anger issues: Shoot Confidence twice to enlarge him then shoot his attackers to shrink them.
 * Speak to Sheogorath, receive the Wabbajack and be transported back to the Blue Palace.
 * If this is the last item needed for Oblivion Walker Achievement/Trophy then the Achievement / Trophy is awarded before completing the three tasks.

Entering Pelagius' Wing
Dervenin, a homeless man in Solitude, requests that the Dragonborn help his master to return from "vacation." He explains that he/she can find his master in the Pelagius Wing at the Blue Palace. Because this is locked, the Dragonborn must talk to one of the maids and tell her that Falk asked him/her to clean up the area and she will hand over the key. If Falk likes him/her well enough (for example, after accepting The Man Who Cried Wolf) then Falk will present the key.

The Dragonborn then should enter the Pelagius Wing and go to the second floor. He/She must walk down the hallway and he/she will automatically be transported into Pelagius' mind, while inside the Dragonborn will not have access to their inventory, and equipped items will be replaced with a set of fine clothing.

Pelagius' Mind
After arriving in Pelagius' mind, the Dragonborn will be facing Sheogorath and Pelagius who are having a tea party. Once Pelagius leaves, talk to Sheogorath. He will tell the Dragonborn that the only way to leave Pelagius' Mind is to "treat" it. Sheogorath gives the Dragonborn the Wabbajack to use to do this. The glade around the table has three stone portals with paths leading to where the Dragonborn will treat aspects of Pelagius' mind.

Paranoia
From his earliest years, Pelagius was very paranoid. To fix this, go through the northwest portal. Follow the path to arrive at a stonework arena with two Storm Atronachs fighting and three men (two have helmets) on the opposite wall. Sheogorath explains that the Dragonborn's monster must win. Do not use the Wabbajack on the battling Atronachs, as the other will transform as well and the stalemate will continue. Shoot the two men on the opposite side of the arena. (After a few failed attempts Sheogorath will give a hint: "Me thinks your aim is off") The men then turn into wolves and kill the man in between them. This resolves the situation and cures the paranoia. Return to the tea party area.

Night Terrors
Pelagius has had nightmares all his life. To help fix this, go through the northeast portal and find a sleeping Pelagius. Shoot Pelagius with the Wabbajack to make a creature appear, then shoot the creature to turn it. Keep repeating this (shooting Pelagius and then the creature) and Pelagius will eventually wake up. Once Pelagius gets up out of bed, the Night Terrors section is over.
 * There is a chest in this area that appears during the fights against the creatures, though it will not open no matter what is done to it. This is because even though it resembles a chest, it is still the creature by lore and is coded to be an event, not a chest.

Anger issues
To help Pelagius with his anger issues, go through the southeast portal. Use the Wabbajack on the little guy named Confidence to make him grow larger, then use the Wabbajack on his corporeal attacker to make him smaller. Ignore the ethereal attackers until Sheogorath speaks again. At the end, Pelagius is finally ready to love himself (but continue hating everyone else). Return to the tea party glade.

Home
Once done, return to Sheogorath. He will give the Dragonborn Wabbajack (Skyrim) and also give and equip him with Fine Clothes and Fine Hat, then sends the Dragonborn back to the Pelagius Wing of the Blue Palace. Go down the hall to the stairs, and visit the cellar at the end. There is a skill book, Surfeit of Thieves there. In the cellar, in the center of the room, there are two crates holding up a gold chain. A candle has been placed on right crate and Surfeit of Thieves on the left crate.

Trivia

 * The quest itself is a parallel to that of the popular novel by Lewis Carroll entitled Alice's Adventures in Wonderland, commonly shortened to Alice in Wonderland, where Alice is instructed by The Mad Hatter to do several menial tasks while he has a tea party.
 * When the Dragonborn asks for the key from one of the maids, they will be prompted to respond that "Falk said it would be okay", even if they hadn't visited the Blue Palace and met Falk before that point.
 * During the first conversation with Sheogorath, he mentions the ghost of King Lysandus. This may be a reference to.
 * This quest is the first time two protagonists of separate Elder Scrolls games meet, assuming that the Hero of Kvatch has indeed embraced his role as the new Sheogorath at the end of Shivering Isles, just as Haskill and Jyggalag foretold. His conversation with Pelagius III supports this.
 * Further on the theory of Sheogorath being the Hero of Kvatch, Sheogorath mentions a "Fox" (capital "F") and "a severed head". The Fox could be a reference to the Gray Fox. The severed head could be a little hint towards Mathieu Bellamont's mother's head.
 * During his conversation with Pelagius, he will make a reference to the film "Charlie & the Chocolate Factory". He will conclude his conversation with Pelagius by saying "A good day to you sir, I said good day!", a line said by Willy Wonka in the film.
 * After the first conversation, Sheogorath will say "Do you mind? I'm doing the fishstick..." This may be a reference to the Bethesda forums, where new members used to be greeted with 'a Fishy stick'. The line may also refer to a dance created by the hosts of the comedy podcast "You Look Nice Today". In the episode "Sacks-Minnelli Disease", they describe "doing the fishstick" as a slight twisting of the torso, doing a facial kegel, and having a minor palsy.
 * Once the Dragonborn completes waking Pelagius and curing his night terrors, if the Dragonborn walks over to the sultry maiden, she may greet them with a man's voice. Sometimes, she will say that her wife died, and that things won't be the same without her, all in the same male voice.
 * When completing the night terrors portion of the quest; if the Dragonborn attempts to pickpocket the Sultry Maiden, she may speak to him in a male's voice as well.
 * If the Dragonborn is a vampire during this quest, they can feed upon Pelagius the Tormented when he is sleeping.
 * The map shows the Dragonborn as being just north of Bleakwind Basin.
 * After talking to Sheogorath (after "treating" Pelagius's mind) he may say this: "Well, time to return to the Shivering Isles. The trouble Haskill can get into while I'm gone simply boggles the mind..." This is a direct reference to Oblivion seeing as Sheogorath is the creator of the Shivering Isles. Haskill is the fellow the first encounters when entering the Isles (the person sitting at the desk in the enclosed room). He is also Sheogorath's chamberlain. This is to ensure the Isles do not fall into complete madness, which is ironic if Sheogorath is suggesting that Haskill is the one causing trouble.
 * When Sheogorath sends the Dragonborn "home" he asks that the Dragonborn looks him up (jokingly) if they're ever in New Sheoth. New Sheoth is the capital of the Shivering Isles, located between Mania and Dementia.
 * This quest shares some similarities to the Oblivion quest Through A Nightmare, Darkly.
 * During the quest, the inventory can be opened by killing and searching the g​oat, or by pickpocketing any of the Pelagius's encountered.
 * While in Pelagius' Mind, the Wabbajack will have the description "It's all you've got...", a reference to the fact that the Dragonborn is stripped of all possessions while in Pelagius' mind.
 * After curing Pelagius from his night terrors and reporting back to Sheogorath, he will mention Barbas and how he barks in the middle of the night and chews on Sheogorath's slippers but will realize the Dragonborn was referring to Pelagius.
 * The chest in the Path of Terror Nightmares with Little Pelagius and the man voiced Sultry Maiden can't be opened nor be interacted with.

Bugs
Der Geist des Wahnsinns Безумный ум