There are two kinds of mistakes in tennis: positive mistakes and negative mistakes.
After you make an error, you can react in one of two ways. You can get upset and brood about it. Or you can determine what you did wrong and learn from it.
Maybe you failed to get your racket back soon enough. Or didn't watch the ball. Or didn't follow through with your stroke.
Whatever the mistake, the best reaction is to recognize it for what it is--an expectable part of your learning process. File away the information you need to avoid repeating the error, and go on to the next point with your mind clear.
You'll improve faster and enjoy yourself more if you make positive mistakes instead of negative ones.