After having a tough, niggly, deflating experience on the pitch, it is always worth taking a little time to re-centre yourself. Get yourself back to an emotional and mental equilibrium before your next game. If you don't reset yourself, you risk marching into the next game with the hang over negativity from the previous match which the players then pick up on and very quickly you find yourself back in the same situation. And you don't enjoy the game as a result.
You need to find your own way of resetting/re-centering - I like to do a little silent meditation, sometimes listen to energising music instead or simply write down on a piece of paper the reasons why I referee, my goals for the upcoming game, how I intend to referee the game and how the game is going to go (actually visualise yourself calmly and confidently managing the game with a smile on your face - enjoying it). Works for me.
I might be way off and the teams actually were just being gits, but it is always something to bear in mind.