When I lose a match - I don't lose the lesson.
I spend some time reflecting what I can do next time when I encounter a similar player. I also look at myself and analyze if I need to improve my physical or mental conditioning.
It's been very useful to record video on (especially losing) matches. To see where the holes in my game are.
Paying attention and using strategies to improve is the true game of tennis. Putting conciliatory effort behind your preparation, practice, game plan and execution!