There are a few things you can do to minimize these not so great rides. Most of it is common sense, but some of it may just do the trick for you.
First, eat well. Keep a good, healthy, energy-promoting diet. Sometimes, an energy drink or a bar before your ride can get you going as well. Eating and drinking during a long ride is also important. Your body needs fuel to keep going and you're the only one who can supply it.
Second, warm up. Take a minute before your rides to stretch and get your blood pumping. If your ride starts with a hard hill right off the line, pedal around the parking lot for a minute before you give yourself a heart attack. Try to keep things under control until your body figures out what it's doing.
Third, get your balance. Sometimes, when things are feeling a little off, it helps to take a few minutes to work on your balance. Try to track stand, ride as slow as you can, play around on some obstacles, or try riding along a curb or following a tight line.
I find that sometimes this stuff will get my brain into the right mode and my balance will feel great for the whole ride.
If none of that works, don't torture yourself, go home, riding probably won't suck tomorrow.