Image source: Getty Images.

No one wants to work their whole life -- saving and investing the whole way -- just to see it all go to waste in retirement. Sadly, that's what happens when you make major mistakes preparing for and during retirement.

Here are three of the big ones you need to avoid at all costs.

Not coordinating Social Security with your spouse

Social Security provides more than half of retirement income for 53% of married couples; it's clearly an important program. If you don't plan correctly, you could end up leaving your loved one in dire straights after passing away.

The size of your monthly check is based on two things: (1) how much you earned during your 35 highest-earning years, and (2) when you decided to start collecting benefits, between the ages of 62 and 70. The key thing to understand is that when one partner passes away, the surviving widow assumes the deceased's benefit -- assuming it was the higher of the two monthly checks.

Typically, the No. 1 priority should be to maximize the higher-earning spouse's Social Security benefits. It leaves more for surviving spouse after the higher earner passes away.

Of course, you have to make ends meet -- and that may require the higher-earning spouse filing for benefits before turning 70. But either spouse can file as early as 62 years old, and having the lower-earning spouse do so can help make ends meet in the interim. Every situation is different, but the takeaway is universal: When choosing an age to receive Social Security, balance your immediate needs with what you'll be leaving your spouse with.

Taking out too much early in retirement

The 4% Rule is a simple heuristic that guides many retirees. In Year One of retirement, you withdraw 4% of your nest egg, and adjust that figure for inflation every year thereafter. Back-testing has shown this strategy to help preserve wealth over time.

There's only one situation where -- using the 4% Rule -- you could find yourself in danger: When your investment returns are substantially negative in the first few years of retirement. Let's look at what would happen if you endure two consecutive years of 15% losses in your nest different points in retirement.

Assumes inflation of 2% per year, investment returns in retirement of 6% per year, with the exception of the 15% drops in the given two year time frame.

No one's returns would ever look this smooth and uniform, but that's not the point. The lesson is the fact that when you lose lots of money early in retirement, and keep withdrawing a predetermined amount, the money you take out will be missing out on decades' worth of potential growth that can never be replaced.

While such drastic moves in investment returns are not common, they also aren't unprecedented. If you find yourself in this situation, strongly consider cutting back on your nest egg withdrawals until your investments shore up.

Not developing Core Pursuits before retirement

Wes Moss, chief investment strategist for Capital Investment Advisors and host of the Money Matters radio show, has done fascinating research on what happy retirees have in common. One of the biggest differentiators has nothing to do with money. Instead, it has to do with something he calls "Core Pursuits." These are activities you find rewarding for intrinsic reasons, and that help give you purpose and meaning. Moss found that unhappy retirees have -- on average -- less than two Core Pursuits. Those who are happy have an average of 3.6 when they enter retirement.

The real trouble retirees have is that they wait until retirement before trying to cultivate these pursuits. If you do so, you're usually too late. That's why those in their 40s and 50s need to start developing such interests now.

The good news: Most retirees are very happy

Luckily, most retirees are loving retirement. No age group reports  higher levels of happiness, relaxation, and contentedness -- and lower levels of anxiety -- than those age 65 and older.

Don't let these mistakes leave you on the outside looking in during your Golden Years.