Tilt is purely in the mind. This does not make it any less real: it is a phenomenon of human psyche dealt with by players at all levels of every sport, game, and martial art in existence. It is fueled by doubt and frustration, and grows quickly when not recognized and dealt with.
Everyone deals with it a little differently, but the best ways I know of are to simply take a break and relax a while! If you're already at the point of no return in terms of playing today, then wait till tomorrow. Do a practice round, something easy and unpressured. Use the time to find the trouble spots and get some practice on them. Above all, keep your mind clear and ready to act; don't overthink the small stuff.