It is very important for you as a gambler to set a limited time for yourself, you need to know when to stop and when to start, some set of people gamble from morning till evening which is very bad, one needs to set his limited time.
One also needs to set a budget and stick to it, for example one can say for today I'm only using $50 or $100 to gamble as soon as that your budget is exhausted you stop for the day it prevents you from spending too much
This one is so important, got burned pretty bad once on dice game by trying to use Martingale system on one online casino. The stakes went up pretty high on 12 loss spree. I thought the next bet will be winning bet and lost almost all BTC I had. The experience was pretty sobering, so this rule has to be on everybody's mind when they start a gamble.
The moment the losses start pouring in and you have no control over it then believe me man you are definitely going to find yourself on the wrong side of the table cause that feeling of wanting to win back all you have lost would be repeating itself constantly on your head and it's take discipline and self control to actually have the counter thought to even say no to that feeling. So the best thing I do now is actually have the money i know if lost won't have any effect on me and gamble with it so if it finishes I know that's the end of gamble for that session.