I've written before about overcoming writer's block. My favorite piece of advice on the subject is to "just keep writing." But what happens when you do that and still can't come up with anything worth keeping? As with any problem, it's helpful to find the root cause before you jump to finding solutions. In my own experience, there have been several recurring causes of writer's block. The last one, I believe, is the hardest to overcome.
Lack of Energy I often don't sleep very well. Fatigue makes it very difficult some days to come up with music that I actually think is worth sharing with the world. So, what's the solution for this? Well, you can Google yourself an answer on general sleep hygiene and there are myriad causes of insomnia, but one thing that seems to help me much of the time is to simply go to bed early. It's not a cure-all but it works more often than not.
Even if you've had a bad night's sleep though, you can sometimes use sleepiness as a way to get into a different mood of composing. There are stories of Salvador Dalí holding a spoon while allowing himself to doze off. Once he fell asleep, the spoon would fall off and wake him. Just as he was getting into that dreamy zone in between sleep and consciousness, he would try to remember what his mind was doing and use it as the subject of his art. It may be a bizarre technique, but it illustrates a principal that you can use your mind in nearly any state to spark creativity. Similarly, being sleepy at the piano can cause you to stumble into a different creative mood. It can sometimes cause you to play things differently than you ordinarily would. That can help foster new creative ideas despite the mental fog.
Lack of Objectivity As any person who has attempted a creative endeavor can attest, there comes a point at which you have worked so long on a piece that you can't tell if what you are doing is good or not. This is a block because you don't know if you should keep editing, keep going on in the same direction, or scrap the whole work. Maintaining an objective and critical ear for your music can be difficult. I sometimes find myself explaining away things only to admit to myself later that they were definitely areas I should have fixed.
A helpful tip for this problem is to play what you've written for other people. They don't even have to comment or critique your work. You just need to be there when they are listening to it. This can bring clarity to your own mind about what is working and what isn't. Just having the spotlight on every bar of your song can show you the painful bits. It can also help you know when you've nailed it. If your listener is willing to critique it then it's a double win.
Fear Most creatives probably struggle with fear. Having your work exposed to the world is both exciting and horrifying. Some actors after years of acting still get horribly nervous before they go on stage. I'm usually a wreck if I have to play solo, classical piano in front of an audience. But more than just the fear of exposure or performance anxiety, for many years I was afraid that everything I composed sounded like somebody else. I feared I had nothing to contribute—nothing worth saying musically. Eventually, I decided to ignore that concern and accept the fact that my music isn't going to change the world, but that it's still worth expressing. I still believe that, but I am equally still plagued by the fear that I won't be able to write anything new that is interesting. I had some mild success with one project earlier this year, and that has almost made this fear worse. Was that song the best I will ever write? Was that just a fluke?
All of this self doubt though, takes me further and further away from my goal. My goal is to write music that I think is beautiful and that I believe others will appreciate. By focusing on my own fear and doubt, I spiral down into the least possible creative state. It pushes me to try gimmicks or to think desperately. Instead, I need to remind myself of the basics. Write a melody that you like. But it's not innovative my mind screams. Write it anyway. But this chord progression has been done a million times. So what. I'm using it anyway. Everyone will ignore this song. Good, I enjoy it, so that is enough. In a sense I need to quiet my fears with what I know is true. If it does end up being a "failure" I can always try again.
The causes for writer's block are not the same for everyone, but finding the cause is an important first step to overcoming the block. I said earlier that my favorite advice on this subject is "just keep writing." That's true and I think it's great advice, but remember that just because you write something doesn't mean you can't edit it or even discard it later. The point of the advice is to dislodge the creative block so you can get back into the flow. Eventually, you will write something you do like and that will build confidence that propels you to keep producing.