The development of optical neural networks (ONNs) has opened up new possibilities for high-speed and energy-efficient computing. However, the limited range of available optical activation functions poses a significant bottleneck. To address this, we propose an all-optical, reconfigurable activation function circuit based on semiconductor saturable absorber mirrors and Mach-Zehnder interferometers, capable of emulating activation functions like ReLU, Sigmoid, and Tanh. The reprogrammability of the proposed design allows the same circuit to be reused for multiple tasks by dynamically adjusting the activation function, optimizing both space and energy efficiency in ONNs. Through extensive testing, we have identified the most critical parameters of the optical activation function for effective training of ONNs. We demonstrate via numerical simulation that this optical activation function achieves competitive results for the performance of ONNs, reaching up to 98.5% accuracy on the MNIST dataset.