The great thing about playing online is that you can step away from the computer and nothing will change until you return. After a substantial "win", such as a free spin or bonus round, take a short break.
You are playing a game on a computer program that has no logic, no ulterior motive, and does not care if you win or lose.
You on the other hand, have all the control. The "law of averages" dictates that it is highly improbable you will hit a substantial win two or more times within a few spins. You can decide to cash out, lower your wager for awhile, or raise it.
I vary my wagers based on win ratios. if I am playing 50 cents per line on a 20line slot and win substantially, I drop back to 20 cents per line for at least the next 10-15 spins because I know it is highly unlikely I will hit another "big hit" so soon.
Before you deposit, set a goal. If you deposit $100.00, decide how much is "enough", and make a plan to cash out at 200% or 300% (or whatever) profit and try to stick to it.
On the other hand, stopping your play while you still have money is difficult. But if you set a % limit of how much you are willing to lose, you can come back tomorrow, so it works both ways. Most people are willing to wager their entire deposit and lose it. If this sounds like you, try upping your deposit by 25%, (let's say $125.00) and if you run down to just $25.00, stop.
The length of play often has a great deal to do with cashing out. Since you have a limited pool of funds and the casino does not, it is not possible to "break the casino." The odds are the longer you play, the greater the chances of losing both your winnings and your initial deposit.
I play slots because of the rate of return. Having some sort of plan, even if it isn't scientific, on when to cash out and sticking to it, means I NEVER have to have a Zero night by losing my entire deposit, or wasting my winnings chasing MORE winnings.
As an example, if I depost $100.00 tonight, leave $25.00 and deposit another $25.00 tomorrow, I am "building" on $25.00 I likley would have already lost had I not exercised a little self discipline.
However, I can truly say that if you have ever wagered say $10.00 total on a single spin and won $2,000.00 (as many have playing slots) it does tend to ruin your "logic"!
I gamble for fun, excitement, and enterntainment. It isn't a "second income" nor do I think I am building a retirement fund. On the other hand, after several years at it off and on, I got tired of just chasing my own money and decided to implement a few variations in my play. All told, I guess I am "up" about 23% overall, and it doesn't come in big enough chunks to help or hurt me at any given time.
Best of luck. Great question too, by the way.