Heat the oil in a large skillet over medium-high heat. Add the mushrooms, ¼ teaspoon salt, and ⅛ teaspoon pepper and cook for 3 minutes.
Add the beef and cook until no trace of pink remains, 5 to 6 minutes.
Spoon off and discard any fat. Add the brandy and cook, stirring, until almost evaporated, 1 to 2 minutes.
Add the spinach and cook until heated through, about 1½ minutes.
Season with ¼ teaspoon salt and ⅛ teaspoon pepper. Remove from heat and stir in the Parmesan.
Cut a 2-inch strip off the side of each pita. Spread the inside with mayonnaise (if using) and fill with the beef mixture. Serve with the carrots.