That's odd, I could get out without killing everything!
Is it the Beholder area you're talking about? You know, the dungeon with lots of ooze that's shaped like a Beholder? If so, the exit's at the bottom.
If not, then you probably got stuck in Ghoul Town and you can't get back up the pit. Go to the upper right corner of the map and walk through the door, you'll end up in the ******* Beholder dungeon.
BTW, the Unseeing Eye is like the easiest monster in the game!