Honestly, it is a very hard decision if you are going to continue after you lost a big amount of money in gambling, your mind is saying that you should continue but your heart is saying that you must stop before it is too late. But most of the time, the urge of continuing playing gambling overcomes us, because since our motive on playing gambling is to win, so we are still playing gambling even though we are losing.
There are a lot of other reasons involved as well. For instance, lack of any other work also pushes people to these kind of activities. I wasted about an year only with gambling sites because I had no job or business. Now, I have so much work to do that I cannot afford to spend lot of time on gambling even if I am winning.
Yes, the main factor is our circumstances. If we have a busy we will be easy to forget the defeat though in large quantities. But if we don't have a busy, our brain will continue to lust for gambling and ambition to return the money that has been lost.