snip
My advice is to stop before you lose a lot and never continue playing when you can win a lot, just like that.
It looks easy, but doing it is very difficult because I have experienced it. Limiting access to bankrolls can be a solution but as a gambler, you will be able to find ways to keep depositing money to play gambling. Stopping when you reach a certain number of wins is similar to my suggestion but here, the difference is that you say a certain amount, whereas I don't say how much.
yes, definitely one of the cases where it's easier said than done
another solution is deciding how many games you will play or for how long
or also have a "guardian", a person who'll be with you and tell you to stop
none of these are fool proof, but can be helpful