The game, the match, and maybe some money - that is the cost of negativity. Defined in Webster's: negative - marked by denial, prohibition, or refusal.
Lets say you just made a shot that went awry for some reason, and it cost you the game. You're frustrated because you have been doing that all night. Shot after shot missed by the object ball getting a bad roll or the cue ball scratching by caroming off a ball sending it into the pocket.
Sometimes it's under your breath, sometimes it's a bit louder but you say "&!!*.!" I know because I do the same thing. But what I don't do is, dwell on the shot. I have had people come up and ask me about the shot I just attempted, and I have trouble remembering how the shot was set up, the lay of the balls and so on. I even have trouble remembering the shots I make. By the time I am either racking for the next game or waiting for my opponent to rack I cannot tell you into which pocket the 9 ball fell.
I joke about this all the time: when someone, including me, misses a shot, and says, and I quote "HOW'D I MISS THAT" I say, and I quote "you hit it wrong." That is it, that is the only reason you miss, or the cue scratches. Say it to yourself "I hit it wrong" then forget it, don't dwell on it.
This is not something you can accomplish over night, but if you make the mental part of your game part of YOUR basics an integral part of YOUR game, something YOU practice, it will happen for you.