This is one of the major topics that is never covered here (or maybe I haven't seen any such threads related to this).
I think there is some threads that are somehow related to it but either outdated nor locked, see the links below:
Bankroll management - Don't go bust all the timeBankroll Management Challenge!Will you borrow money as your bankroll if you trust your skills in gambling?Deciding Units
I always do this especially on slots gambling so that I get too many spins. If I have only $10 on the bankroll I'd goo deep at 0.01 so that I may have a thousand spins to play with but the win was really that low. Sometimes I does this but when greed comes along busted was the outcome.
Never chase your losses
This is where always most gamblers been broke that much and I agree with you but becoming a smart gambler isn't that easy along the way maybe you could be broke many times before you learn your greatest and expensive lesson.
Calm mindset
How I wish we are that calm but if a loss streak do happen most do panic and that's not the way we can calm our mind. The thing that calms my mind while playing is listening to music, pretty good it eases and makes me feel good especially if it's a jiving one (well, I'm referring when playing crash, dice, blackjack and slots - the fast games).
Have an edge over yourself
IMO those who gamble for fun I think they have already set their mind that they are prepared it will lose but when luck do happen they sometimes feel that they couldn't have to loss it anymore, I do sometimes feel it this way. There's no really fun on losing those money but I think having an edge is only when you got the expertise on the field especially on sports betting but on fast games and game of luck I think that's not possible, just my two cents.
Maybe poker, sports betting and other game of strategy is where you could only have an edge over something you're betting, I think it do fall on that category. Well, bankroll management wasn't bthay easy for most for starters but experience and more losses do help sometimes on the learning process.