As someone with anxiety, I still have problems with doing things. I become panicked easily and I end up paralized by fear, overthinking every detail. So I can tell you from the other side of the problem, that this approach won't probably bring you closer to your goals
Maybe instead of trying to motivate yourself with a stick, you could find a carrot? Is there a way to make learning fun?
The emotion I fear the most: abandonment and probably rejection