Before you ride into a head wind, assume a position which is aerodynamically correct for riding. If you are riding a mountain bike, place your arms in a comfortable position on the bar of the bicycle near the stem and keep your arms close to your body. For a road bike, position your hands on the drops of the bike. Keep your head as low as possible. This will reduce the area of your body exposed to wind, thus reducing wind force working against you.
Pedalling into a head wind would be easier if use smooth power. This can be accomplished by keeping the bike in a high gear. Consider dropping your cadence as well. This will help in reducing the effort required to pedal into head wind.
Consider riding in groups. This technique can be really helpful because if you are riding into head wind behind another rider, the effort required is reduced by about 20 percent. Let the other rider lead for a certain period of time and then switch places to give some relaxing time to the other rider.
Get into a positive frame of mind and stay focused. Remember that you will have a tailwind on your way back. This means that you will have to spend only a very small amount of energy on your way back.