Peel and devein the shrimp. Rinse and pat them dry with paper towels. Marinate the shrimp in a bowl with mirin, salt, ground white pepper, egg, and cornstarch for 5 minutes.
Mix the ingredients for the sweet and sour sauce in a bowl and set aside.
In a deep skillet, add enough oil for deep frying. Once the oil is heated, deep-fry the shrimp in batches until they turn golden brown. Remove and drain on paper towels.
Discard the oil from the skillet. Heat the skillet over medium-high heat and add the bell peppers and pineapple pieces. Stir-fry for less than 1 minute, or until you can smell the peppery aroma, then add the sweet and sour sauce. Once the sauce thickens, transfer the shrimp to the skillet and stir constantly to ensure the sauce coats each shrimp evenly. Turn off the heat, then dish out and serve immediately.