Preheat your oven to 400°F (200°C) and line a baking sheet with parchment paper.
In a large bowl, whisk together the flour, baking powder, salt, and sugar.
Add the softened butter to the dry ingredients and mix until crumbly.
Gradually stir in the milk until a dough forms. Knead gently on a floured surface for about 1 minute.
Roll out the dough to about 1/4 inch thick and cut into 4-inch squares.
Place a tablespoon of pizza sauce in the center of each square, followed by a generous amount of mozzarella cheese and a few slices of pepperoni if using.
Fold the dough over to create a pocket and press the edges to seal. Use a fork to crimp the edges for a decorative touch.
Brush the tops of the pockets with the beaten egg for a golden finish.
Bake in the preheated oven for 15-20 minutes, or until golden brown.
Allow to cool slightly before serving.