I live in a place where the wind is 25 mph+ at least 3 days a week, and 10+ the rest of the days. If you want to ride a bike here, you are going to ride in the wind, period. Here's what I do to put up with it.
1. If at all possible, plan the first half of your ride to be into the wind, and come back with a tail wind. This lets you do the hard work when you are fresh, and you get the mental benefit of sometimes averaging 25-30 mph on the way back home. You can still work just as hard with a tailwind, you just go faster.
2. Spin. Get your cadence up to 85-95 and just grit it out. Trying to push big gears into the wind is both counter productive and mentally draining.
3. Think about
rule 9. When you meet cars on the road and the driver has that "What a dumbass" look on his face let that be a source of pride, not embarrassment.
Most experienced riders will tell you that wind and hills are 90% mental. Wind more so because there's not usually a "downhill." Just concentrate on what a badass you are when that 30 mph gust hits, and remember that no one said this cycling thing was going to be fun.