The most straightforward way to win at gambling is to not do it all, but there is a more roundabout (and much more fun) way that works just as well. "The house always wins." This is a truism understood and accepted both by the players and the gaming establishments, be they casinos or state lotteries. When you lose, the house wins by taking your money. When you win, the house also wins because a lot more money comes into it from the losers than goes out of it when they pay you.
Now, you could make use of this fact by running your own gaming establishment, but that's not realistic for the vast majority of people - we have neither the seed capital, the time, the inclination, or perhaps even the legal right to try. But consider this, and really think about it: What do you need the other players for?
Consider how much money you've spent over the course of your life on gaming - all the scratchers; lottery tickets; bingo nights; raffles; horse races; sports betting; office pools; stock purchases; vacation visits to casinos; and all the other various forms that gambling takes. Unless you're an exceedingly prudent person, your lifetime total probably runs into the thousands of dollars - a quarter in a slot here; a scratcher on the road there; drop a few dimes in Vegas on your birthday, etc. etc.
Let's just call it $1,000 for the sake of giving it a nice, round number. How would you feel if you won $1,000 from a slot machine? Put in a quarter, some noisemakers go off, and you go to the cashier and watch them counting out a thousand in crisp $20 bills. It would feel pretty good, right? In fact, it would feel like you had just bought $1,000 for the price of a quarter, even though in reality you've already spent that much or more on gambling before that point.
This is why people gamble - the neurological trick that makes a losing proposition seem like winning, and why it gets out of control for some people. If that thrill of winning a Pyrrhic victory is too intense, susceptible people can become addicted. But I'm only talking about the rest of us - people who play on occasion because it's fun and because there's always hope.
So, getting back to my earlier question, what exactly do you need the other players for? What purpose does the casino / state lottery / bingo parlor serve toward getting you that $1,000 prize? The answer is clearly "not a damn thing." You already had that money, but spent it earlier gambling on other people's terms. What you're paying the house for is not money, but the thrill of victory - the injection of dopamine your brain rewards you with when a quarter comes out looking like 50 Andrew Jackson portraits. You're paying them to trick you into feeling like a winner, and if you're an intelligent person, you already know that and are perfectly okay with it.
But why are you okay with it? I submit we accept a false dilemma in the bargain: Whether to be prudent and save our money, foregoing the occasional pleasure of an irrational "Holy shit, I won!" moment, or allow ourselves to gamble modestly for fun despite always coming out in the red. Allow me to ask a question that will sound silly at first, but I promise will make more sense as you think about it: Why not just gamble with yourself? Why not be both the house and its one and only player? If someone else can trick your id into feeling triumphant when you're actually behind, why can't you trick yourself into having the same pleasure when you're break-even or better from interest on savings?
Start simple and small: Instead of buying a scratcher, hold on to the money and look up the odds (they're usually printed on the ticket). Now devise your own game with the same odds, and play. Every time you lose, add your money to a jar. Every time the jar reaches a certain value, put the money in an interest-bearing savings account. You'll win small amounts here and there that can come straight out of the jar, and on occasion you'll "win big" and dip into the savings - but even when that happens, "the house" (i.e., YOU) will still have saved more than you paid out to yourself.
And this is the crucial part: It will feel exactly the same as having won that money out of a slot machine or from a lottery ticket. Because you didn't know it was going to happen - it was a surprise. Your brain stem releases pleasure, even though all you're doing is getting your own money back. You're winning when you're winning - the money goes into your pocket, and you can do what you want with it, including playing again. You're winning when you're losing - the money goes into your savings account. And you're winning when you're not even playing - your savings account is generating interest. You're also winning because you're having fun, and feeling smart because you're paying yourself to have fun. The quirks of the human brain are often used to exploit us, but we can turn our own weaknesses into advantages by thinking outside of our own little Skinner Boxes.
All well and good, you might say, but wouldn't you cheat? Wouldn't there be a temptation to just empty the jar or the savings account and splurge every time we want something? Yes, to some extent. But here's the good part: The temptation isn't nearly as strong as if you were just saving the money outright, instead of turning it into a game. Because it's a game, there are rules, and it's more fun to win when playing by the rules than by cheating - it feels like a reward, a validation. Cheating, on the other hand, is a negation both of the game and of our own investment in it: Even if you lapse on occasion, you'll feel stupid and weak for having done so, like with a diet (except that diets aren't fun).
Eventually it just becomes a habit, much like buying a weekly lottery ticket or playing bingo on the weekends, and meanwhile you have a rainy day fund growing through the artful manipulation of your own weaknesses rather than in opposition to them. Of course, you need to have some sort of income to do this at all, so it's no solution if you're unemployed or drowning in bills, but if that's truly the case you wouldn't be buying lottery tickets anyway...right? If, however, you do have loose change and spare $1 bills floating around, why not play a game that, for once, is unfair in your favor?
If you find it helpful, you can tweak the odds and the rules of your game to increase or decrease the "house margin," and as long as that margin is still greater than zero, you're still doing yourself a favor by playing. And the beauty is that you can play it any way you want: You can flip a coin three times, and reward yourself with it if you get three heads or tails in a row. Call a football game. Generate a random number on the internet. Flip to a random page in a book and bet on what the first letter will be. The point is, play your game long enough, and you'll stop seeing it as getting back your own money when you win - you'll see it as a bonus, as something you've been rewarded with. And you'll have fun both setting up and playing the game: A high-stakes roller in your own mind, and a financially prudent, responsible person in reality.
Plus, if you're ethically flexible, you might let friends and relatives play your game (that is, with you as the house) at a lower level - dimes, quarters, etc. If so, keep both the cost of playing and the potential winnings low enough that they can trust you (and you can trust yourself) to pay them if they win. You can even be totally up front with them about your system - how you trick yourself into saving money - and they'll probably still prefer to bet with you rather than rock the boat in their own life, since (from their perspective) they're just throwing around dimes and quarters here and there - a fun little diversion. Meanwhile you're building up a nice little cushion.
Hell, you might even become a degenerate gambler...in which case you can walk back and forth to the bank to pay yourself instead of driving there, so that you can make it into an exercise routine and save on gas. You're never going to get rich this way, but the hard truth is you're never going to get rich playing the lottery either - but this way, you'll be richer and feel better than people who spend money paying someone else to flip their reward-pellet switch.