Spread 4 pieces of bread with pesto. Spread the remaining 4 pieces of bread with tomato sauce. Divide the mozzarella between the 4 slices of bread with pesto, and top with the tomato sauce bread. Use a sharp knife to remove the crusts. Pinch edges together to seal.
In a small casserole dish, whisk the eggs with the milk; season with salt and pepper.
In a large cast-iron skillet over medium heat, add 1/4 inch of olive oil. Once hot, add the sandwiches in batches, and fry on both sizes until golden and crisp and the mozzarella is melted, about 4 to 5 minutes per side.