It is a sign of being addicted in gambling. I honestly got the same experience of it before but not too much, as I remember it happened to me only two times, I had a weekly campaign that I joined before and after I got payed every week I spend it all on gambling after I lose all of it in that week, and bet again the other week with a thought that I will recover what I had lose, but ends up losing all of it
I am happy that you learnt your lesson. It is fine to lose money if you gained such a valuable thing. Gambling can never be a source of income and this is the reason why it cannot also help you or anyone in recovering the lost money. So the best is to not play this game but is fail to do so then better is to not at least try recovering what cant be recovered.
There is literally two option, keep gambling or leaving gambling all together. Now if you do not have any money left or you have played with money you shouldn't that means you should definitely quit.
If you gambled with money you can afford to lose and just unhappy that you lost you can again leave but I suggest giving games like poker or sportsbetting a chance before you leave all together. That way you at least play something that you can adjust the odds or play against other people and not purely luck based gambling.