practice
It can be challenging to practice when in a bad mood. That might be upset or distracted, or just not highly motivated. Let's face it, competitors love the adrenaline of tournaments and money matches, it can be hard to get fired up to practice a line drill after a day's work. As a result, the level of play can be pretty low quality.
I have a table at home, so sometimes all I need to do is take a short break. I can return to it again 30-60 minutes later and might be more up to the task at hand. Other times I get determined to grind it out.
One thing that has really helped me was a breakthrough I had about 10 years ago. I used to despise practice or playing for fun because I never played my best game. I would get careless or lazy in ways I never would in a money match. But then I realized that even though it's due to lack of engagement, I was still making mistakes! Why those particular mistakes instead of others? I started to pay closer attention, and sure enough the errors I was making were similar to the ways I might dog it under pressure.
The bottom line is that my game has strong suits and weak links. While it's not fun to be disengaged, errors from lack of engagement still highlight the weak links in our game. For this reason practicing is always valuable, and if I am making mistakes I no longer say "I would've made that if I was gambling", but instead "Hm, I might have dogged that if I was betting a lot, maybe I should work on that shot". Then I'll make myself shoot it for a while to make sure there is a constructive consequence for my lack of effort.
It's really satisfying to outwork a bad session and end up in stroke. And even though it doesn't always happen, the work you put in makes a difference when you really need it to. So while I occasionally back down from a bad session (at least temporarily), I think hours on the table are a good thing no matter how ugly it looks at times. I think the concern about reinforcing bad habits is mostly a cop out. If you want to win you have to put in the work. If I only practiced when I felt like it and how I felt like it I don't think I'd play as well.