Pain is weakness leaving the body,
Feeling stupid is ignorance leaving the mind.
Embrace it. School is designed to give you set pieces that can be understood in isolation, the outside world rairly has that luxury. You won't truly improve without discomfort, though the particulars will be personal and multidimensional.
The end skill is solving problems in the wider world.