First of all, thank you for an interesting and positive original post. It’s a fantastic question that can only prompt great ideas and useful feedback for a lot of people, and that’s what makes it so positive.
I too am learning something (a language), and I found out that discouragement is an actual barrier to learning, i.e., neural pathways shut down or some shit. Anyway, the workaround to that is, surprisingly, to go backward. To go to a more remedial level, nail it more easily and build up the confidence to keep going and learn more. All learners NEED to feel that progress is taking place, or else the brain won’t move. It’s a momentum thing. Best not to go too high too fast.
Generally when I am working towards a new goal or trying to learn a new artistic skill I do two things that really help me get through the hard part. The first one is quite simple; instead of thinking about how hard it is in the moment, I think about how amazing it will be once I accomplish my goal. This really encourages me to push through that barrier and accomplish my goal. The other thing I do is listen to music. Usually calming piano music does it for me but I am sure any music you like will help. This allows me to clear my head and focus solely on the thing I am doing. I have found that music is really good at chasing all the negative thoughts away and allowing me to do what I need to do.
These are just the things that help me, so they may not work for everyone. Still, I hope I could help at least a little bit!