I've already written about how "bad" meditation is in fact invaluable because it teaches you how to relate to unpleasant things. But there's another move you can make with unpleasantness in meditation.
That move is to investigate, and it's beloved of a style of meditation that gets called Vipassana, which means insight (although in fact there are lots of styles of meditation that deserve that name, some of which are quite different).
So how and why do you investigate the unpleasantness of meditation? Well, what you don't do is think about it. Rather, you just notice and observe the unpleasantness, and also perhaps any thoughts about the unpleasantness.
This is, of course, mindfulness. The simple noticing of sights, sounds, smells, tastes, sensations, and thoughts. If you pay attention to the unpleasantness of meditation, you can start to notice what it's made of: sensations and thoughts. Maybe there is discomfort in your back. Maybe there is tension. Maybe there is restlessness. Tune in and notice exactly what it feels like. Maybe there are unpleasant thoughts: worry, or regret, or self-criticism. Just notice those too. Maybe, and this is a slightly more advanced move, you can notice your aversion to all of that. Can you notice the feeling of not liking the itch on your nose, or the boredom you are feeling, or the annoying thoughts? Can you notice the quick, fleeting thoughts that say, "I don't like it", "Why is it so unpleasant today?" or "How long till the bell?" Just keep on noticing - that's your investigation.
We might do this for two reasons. First, it draws the sting of the unpleasantness. As I've said in previous posts, when we are mindful of thoughts and feelings, they lose their power over us. So when you start to notice and observe the unpleasantness of the meditation, it doesn't bother you so much. You can, to use a common phrase, sit with it. And second, it facilitates insight (Vipassana, remember?). You'll see how the unpleasantness isn't quite as real as you thought it was; that it can be pulled apart into its constituent sensations and thoughts, none of which are that bad on their own. And you'll see how you create your own suffering, because it's only when you get pulled into your thoughts about your uncomfortable sensations that things seem so bad.
And, as always, if you can do this in meditation, perhaps you can do this in the rest of your life. Perhaps, in learning to bear with unpleasantness in mediation, in learning to turn your attention to it and investigate rather than getting snared in the thoughts and feelings of aversion, you can learn to do the same with other difficult things in your life. And perhaps then you'll be free to do what you really want to, even if it means some unpleasantness.