Maintaining discipline in gambling requires setting clear boundaries and adhering to them. This includes establishing a gambling budget and sticking to it, avoiding chasing losses, and knowing when to walk away. Developing a strategy, such as using a predetermined betting system, can also help in maintaining discipline and making rational decisions rather than succumbing to impulsive behaviour.