When what you are trying isn't working, do something else. Unless you're on a deadline to learn a song or songs for some audition or gig, move the music focus around and play different things. Some days the brain is just not ready to take on new stuff. Fine. Play old things that you know. Play melodies, kids songs, church songs, TV commercial melodies. Simple scales, make up your own scales, make up different rhythms. Not everything you play has to be impressive. Enjoy simple music.
After a while go back to what you were working on and see if you don't have a new point of view. Much of playing music is mental. While we think we are learning music, we really are learning how we play music. To play well is to know yourself well.
Its a journey without a final destination. Enjoy the trip.
Never confuse beauty with things that put your mind at ease. -Charles E. Ives