The key for me will always be that, to play only with the money that I am willing to lose, when that happens what you should keep in mind is that at the moment of losing you just have to accept the defeat and have the discipline to not continue playing more , because if you play more it means Spending more money and that is the rule that cannot be broken, if you break that rule we are doing nothing.
As you said, I set it after I experienced a loss that I considered significant. It wasn't actually to the point of losing any of the goods or assets I sold to gamble, but I did lose a significant amount of money. After experiencing that experience, I finally came to a reasonable understanding of gambling. We do need to set our own rules, but perhaps more accurately, they should be boundaries, or, as you say, discipline.