When I was playing Oblivion: Shivering isles and Skyrim, I thought that Sheogorath and Pelagius the Mad are the same person. If they do so, how did Pelagius became a Daedric Prince?
I haven't played the older Elder Scrolls games, so I can't answer definitively, but in Skyrim, it seems clear from the Sheogorath daedric quest that they are distinct individuals: they talk to each other and have dissimilar voices.
After further research on the UESP wiki, it turns out that Sheogorath worship has existed for at least a thousand years in Morrowind, but Pelagius III was born in 3E 119, which is 314 years before the Oblivion Crisis and 500 years before the events of the Skyrim/Dragonborn saga. Also, the old Sheogorath was Jyggalag, the Daedric Prince of Order, cursed by the other Daedric Princes. The Hero of Cyrodil takes over the role, becoming the new Sheogorath. So lorewise, Sheogorath shouldn't be Pelagius, and definitely can't be Pelagius after the events of Oblivion.
Some speculate that the Sheogorath in Skyrim is the Hero of Kvatch, your playable character in Oblivion. It makes sense if you've ever played the Shivering Isles DLC (AKA The best thing in the whole entire world). But as far as my knowledge of the lore goes, Pelagius is just a madman whose soul now belongs to the Lord Sheogorath. Not the Madgod himself, but then again I could be wrong.