Today is one of the worst day of mine in gambling. I lost a big amount that I saved out of my campaign participation. For that reason the day is worse, same time it isn't worse as that of OP. Because, OP have used the money for his education to gamble and tried to borrow money for his fee. Here it is my earned money, and now I need to sacrifice little of my daily needs for some time period to overcome the loss. So, in any circumstances it is must to segregate the fund and use it wisely. Just an uncontrolled gambling have caused OP ruin his education with carry over.
Right control with your emotions will allow you to avoid or lessen the chance of causing big problem when losing your money, I mean there are people like OP who will learn things from doing a big mistake, gambling is addicting and if you don't know how to handle your emotions, your engagement will continue to grow, very possible that you will do things that is not usual with your routine same with how OP use the money for his education.
There are a lot of stories which like OP and you that suffer coming from unexpected mistake, you just need to move on and not to dwell but make sure that you will learn from such mistakes that are made.