you could stay away from online gambling by keeping less money online. So even if you lose you don't lose much.
To stay away in gambling needs a lot of discipline, you need to be more focus on doing productive things that would affect your life in a positive way in the future and never gamble if you can't handle the stress it brings unto you.