Using op-amp and diode switch to drain capacitors – how to limit current?
This is what I gathered from your comments, additionally to what is stated in the question:

I need to discharge it to roughly 0.5V in less than about 20 ms

The capacitor [...] I need it to be at least 1 µF to keep the output smooth

The V1 params [...] a trigger signal that sends a short (about 20 ms) pulse every few seconds at most

SW1 exists, but it's a multiplexer IC. [...] remains closed for 1 ms every 40 ms.


For these conditions, the MCP602 datasheet indicates that the IC will not be damaged by the discharge current even if no limiting resistor is used:

Simulating a similar op. amp. regarding the output limits (LT1677), just as an illustration, with resistors from practically zero to 1 k (10 values per decade), it is clear that as the value goes below 100 Ohm, the discharge time is basically limited by the output current of the op. amp.

Considering that the capacitor holds \$125 \mu J\$, even if your op. amp. dissipates 10 times this energy, due to internal currents, at each second, power dissipation is clearly not a concern.
But you may want to limit the initial current for other reasons, e. g. avoiding the short bursts periodically at the power rails. For that, a combination of a current limiting resistor within your timing constraints with some smoothing at the input may be in order.