Betting on the NBA, or any sports, should be done for entertainment purposes only. You should never bet more than you're comfortable losing.
Legal online sportsbooks offer gambling problem resources like preset betting limits, problem gambling hotlines, and much more.