If you play "great" in lessons and practice but not as well in matches, try this! Every time you go out to practice or take lessons try to play every point or start every point with a serve. That way you are committing to play a "real" point, not just hitting balls mindlessly. The two most important shots in tennis are the serve and the serve return.
Continue to do your normal warm-up for a few minutes feeding all balls underhand. Then start playing points immediately, alternating who serves with your partner.
This way you can leave the court thinking, "I played a lot of good points." Instead of "I hit for 2 hours." You must win points to win games. You must win games to win sets. You must win sets to win matches. Finally, you must win matches to win tournaments. Remember, it all starts with winning points. The more you get used to playing a point with a serve and a serve return, your match play should surely improve! Two of the largest unforced errors are double faults and failure to get the serve return back in play.
Good luck on the courts!