MISTAKES CAN BE GOOD!
Firstly don't beat yourself up about making mistakes, everyone makes them, that's why we train. Accept that you are going to make mistakes. If you have a good Instructor, they are your eyes, they look for these bad habits you pick up along the way and will tell you. It is your job to put them right, alas they can't do that for you.
Secondly, you can't correct all your mistakes in one go, it's too much to think about. Simply focus on one thing at a time and get that right. It could take months to get out of a bad habit but focus on that until you get it right, then move on.
Thirdly, remember perfection cannot be reached. Therefore don't put so much pressure on yourself. This is why your martial arts journey is a lifelong one, you constantly strive and try your best but it's always out of reach, like a rainbow. Just be content that you are learning, improving and continuing your martial art journey.
The key to being a good martial artist is accepting your weaknesses and to practise them non stop until you correct them. You will find by concentrating hard on one thing you will neglect others and so then need to work on them. This is a never ending cycle of martial arts training and one that will keep you busy a whole lifetime.