The most important thing in such a situation is not to get too deeply into debt. Yes, you've lost more than you should have, and now your needs will be affected by a financial crisis. You'll buy less than you wanted. Debt and loans solve this problem, but the main thing is to try to save, because debt is what drags you down. I don't like being in debt to anyone and am willing to cut corners on myself just to avoid the thought of owing someone money. But if someone borrows money and doesn't pay it back—and such people exist—they're the kind of people whose friends leave.
Not only debt, the most important thing is make sure that you don't lose yourself while gambling. You can make money from gambling and the same way you can lose, it doesn't matter if you are good or bad. The people that do post thousands of dollars ticket bet they won from casino has loss some significant amount but don't post those lose because nobody like to celebrate loss, they only want to see the things they like, they don't care if you lose.
If you are gambling, you will get loss and there is nothing you are going to do to control it. You can be too certain about a game and it will not go well. There are days that you will make money that even you can't predict that it will favour. As a gambler, just accept that you are going to make it and you can lose too because it's already part of the process but believe that one day, you will be able to make money too, the key needed is the skill to help you on long term.