I stop my slot play both when I lose and when I win - in both cases. Depends on my mood at the time of play, or if I have spent most of the deposit, or if I have spent too much time on slots.
For example, the last time I played, I stopped precisely because the deposit was lost and as much as I wanted to give away the money for the deposit, I decided not to do so.
You are truly a responsible gambler, I applaud your self-discipline. There will be another day when you will have a jackpot and there will be the same situation, but a bit reversed - try to hit even bigger numbers and withdraw. The choice should be clear, I think

That's the right thing to do.
Make pauses. Rest. Deep breaths. Think twice.
Most gamblers would rush to deposit again after losing the balance in their wallet and I think that's unwise. We must have that little rest to think things through and that also gives us time to calm down.
The same goes after a win especially if it's a big multiplier. Stop for a while, savor it, and don't let your greed push you to keep on betting because you feel like you are lucky. That may also be unwise as it may rapidly take all the profits that you made.