I like to keep a deep enough bankroll that it would be pretty unlikely that I have to move down due to variance alone. For me at 100bb stack NLHE, this is anywhere from 50 to 100 buyins. If you follow bankroll guidelines that dictate having less buyins, then you should move down according to those guidelines if you encounter a losing streak, regardless of if it's playing bad or just bad cards.

Also, if you tend to tilt or start playing bad at all after losing a bit, then you need to stop playing for a while. By "a while" I mean however long is good for you. Some people just need 10-15 minutes to clear their mind, and other people prefer to quit playing for the rest of the day. It's completely up to you and what you feel is best for you.