That does look like a pretty bad situation to find yourself in. Still, if you can just survive long enough, you're bound to sooner or later obtain some solution to your problem, if only via random death drops from monsters you kill. So your problem becomes one of staying alive long enough.
If you happen to have a ring of slow digestion, that will significantly reduce your starvation risk. You should remove any other rings or amulets, at least whenever you're not actively fighting monsters, to avoid ring hunger. Also avoid casting any unnecessary spells, jumping (with the spell or with jumping boots) and fighting monsters that you can't eat and don't have to fight, since all of those activities consume extra nutrition.
Your biggest problem, in terms of finding monsters to kill and eat, is that a lot of them will be generated in the other parts of the level that you don't have access to. NetHack's monster generation algorithm tries to place new monsters where you cannot see them, so to maximize the chance of new monsters ending up in the same part of the level as you, you should either blind yourself or, if you can't do that, wait in the smallest room you can find, with the door closed.
If you happen to know the create monster spell, spam it as much as you can. (Don't wait until you're hungry, since casting it does cost some nutrition.) Make sure not to stand next to any wall that you can't get around, since the created monsters can end up on the other side of the wall. Wands and scrolls of create monster are also helpful, but only have a limited number of uses.
Also note that, if your hunger status ever gets to "Weak" or worse, you can pray to try and get it fixed. If you avoid wasting nutrition on anything unnecessary, the 900 points of nutrition you get from prayer is usually enough (at least assuming that you have't been crowned and haven't killed the Wizard yet) to keep you alive until you can safely pray again, even if you find nothing to eat in the mean time. And if you can kill and eat even a few monsters every once in a while, that "usually" becomes a near certainty.
If you should be lucky enough to run into a brown or a black pudding, make sure to split it and let it heal before killing it. If you're playing NetHack 3.4.3 or earlier, a properly managed pudding farm will give you unlimited death drops (and sacrifices, if you have an altar); this has been nerfed in version 3.6.0, but you can still use puddings as an unlimited food supply.
The wiki page on the foodless conduct might also have some useful tips for surviving without food.
Also, keep your eyes open for any unconventional solutions. For example, reading a cursed scroll of teleportation will levelport you, of course, but so will reading a normal scroll while confused, too. Using a magic whistle next to a wall has a chance of teleporting your pets to the other side, where they might be able to wake up the Master Assassin (although ordinary domestic pets probably won't attack him). A magic lamp or a smoky potion may grant a wish, especially if blessed. Any holy or unholy water should be carefully conserved, since many useful items need to be blessed or cursed to work; if you don't have any, the confused remove curse trick may be worth considering.