There's a different mindset for investing when you're near the point of leaving the workplace. Your focus shifts a lot more toward steady income and less to generating tremendous growth. That means dividend stocks move to the forefront.

My retirement remains years away -- in large part because I enjoy what I do too much. But I do think about retirement some. If I were about to retire, here are the four top dividend stocks I'd buy.

A person walking on a street with white lines painted on it and "retirement" spelled on one of the white lines.

Image source: Getty Images.

1. Easterly Government Properties

I put Easterly Government Properties (DEA -1.15%) at the top of the list for two main reasons. First and foremost, its dividend is about safe as they come. Second, Easterly offers a juicy dividend yield of just under 5%.

The company's name provides a great hint as to why its dividend is so safe. Easterly focuses on leasing properties to U.S. government agencies. As chairman of the board Darrell Crate said in the company's third-quarter conference call, Easterly's properties are "the ultimate and sleep well at night real estate."

As an added bonus, Easterly should deliver solid growth going forward. The company has a strong acquisitions pipeline. It's likely that federal agencies will continue to prefer leasing rather than owning their own buildings.

2. Brookfield Renewable 

Brookfield Renewable (BEP -2.44%) (BEPC -2.04%) ranks as my second pick for similar reasons. The demand for renewable energy isn't going away. Brookfield Renewable's dividend yield of more than 3% is also quite attractive.

My Motley Fool colleague Jason Hall recently went with Brookfield Renewable as the strongest renewable energy stock you can own. I agree completely. The company currently has around 6,000 renewable power facilities that generate roughly 21 gigawatts of energy. But its development pipeline should add more than 31 gigawatts of capacity, with much of it coming from solar and wind. 

No company is guaranteed to be around 30 or 40 years from now. However, with the ongoing shift away from fossil fuels, I think that Brookfield Renewable has a better chance than most to still be thriving for decades to come.

3. Devon Energy

You might think I'm contradicting myself by including Devon Energy (DVN -0.95%) on the list. I just stated that there's a shift away from fossil fuels, yet I've chosen an oil and gas producer as a top stock I'd buy if I were nearing retirement.

But I couldn't resist going with Devon for one simple reason: It offers the highest dividend yield among S&P 500 companies by far. That might surprise you if you look at online financial sites that show Devon's yield is currently around 1%. What the sites don't reveal, though, is that the variable portion of the company's distribution pushes its yield to in the ballpark of 10%.

Will Devon's dividend yield remain so high forever? Probably not. However, an expanding global economy should enable the company to continue growing -- albeit at modest rates -- for many more years.

4. AbbVie

My fourth pick boasts the most impressive dividend track record of the group. AbbVie (ABBV 0.54%) is a Dividend Aristocrat, an exclusive club of S&P 500 members with dividend increases for at least 25 consecutive years. Its dividend currently yields more than 4.8%.

It's important to note that AbbVie does face a challenge in the near future. The company's top-selling drug, Humira, faces biosimilars in the U.S. market beginning in 2023. Sales for the drug will inevitably decline significantly. 

However, AbbVie has plenty of other strong products in its lineup, including autoimmune disease drug Skyrizi and the blockbuster Botox franchise picked up with its acquisition of Allergan. While the company's total revenue is likely to slip in 2023, AbbVie expects to quickly return to growth that will extend at least through the end of the decade.