Buying a struggling stock can be a tough decision to make. A dip could turn into an all-out crash, and you're left with a stock in your portfolio that is deep in the red. But if the business itself looks solid and the fundamentals are strong, then it may be worth going against the grain and holding for the long haul.

Two stocks that are in rough shape today are Merck (MRK -0.05%) and Activision Blizzard (ATVI). Both of their shares are in the dumps, but these are still profitable, dividend-paying companies that could be great buys. Here's why I'm optimistic they can still be excellent investments today.

Advisor reviewing data on a laptop with a family.

Image source: Getty Images.

1. Merck

Merck has quickly gone from being a hot buy to one that investors are eager to dump. When the company announced it had developed a COVID-19 pill that was 50% effective in reducing the risk of serious illness or death, there was plenty of bullishness in the company's future. Merck forecast potential revenue of up to $7 billion next year from the pill, assuming a green light from the U.S. Food and Drug Administration (FDA).

But then came news that healthcare giant Pfizer had an even more effective COVID-19 pill with an efficacy rate of 89%. To make matters worse, recent data suggest that Merck's pill is really only 30% effective, and an advisory panel for the FDA is only narrowly in favor (by a vote of 13 to 10) of approving Merck's pill. And that still doesn't guarantee the agency will agree and grant it Emergency Use Authorization.

As a result, the healthcare stock has quickly gone from a 52-week high of more than $91 in November to barely above $73 nowadays and inching closer to its 52-week low of under $69. It has been a drastic turn for the stock, reminding investors of just how volatile COVID-19 can be for companies that offer vaccines or pills where effectiveness can be uncertain. 

But investors shouldn't forget that Merck is still a strong company even if its COVID-19 pill falters. Over the trailing 12 months, it reported net income of $7.2 billion on revenue of $52.6 billion, amounting to a healthy 14% margin.

In addition, its $11.5 billion purchase of rare disease company Acceleron Pharma this year will give it more avenues to grow and diversify outside of its top-selling cancer drug Keytruda (which loses exclusivity in 2028). Keytruda generated $4.5 billion in revenue for the period ended Sept. 30, accounting for more than one-third of Merck's total sales. 

With solid margins and a new acquisition to bolster its financials, there's plenty of reason to remain bullish on Merck even if its COVID-19 pill falls flat. In addition, the stock offers an attractive 3.8% dividend yield, well above the S&P 500's 1.3% yield. For long-term investors, Merck makes for a solid buy.

2. Activision Blizzard

Another stock that looks like a downright bargain today is Activision Blizzard. The company has been hit hard by some extremely bad press relating to sexual assault allegations and a negative workplace culture. In November, employees, outraged over the scandal, walked out for the second time this year.

No doubt, the issues are serious ones. Bad management can weigh down a company, and the matter bears careful watching as it continues to play out. Moreover, some investors see the risk of a talent drain from the company if the issues aren't addressed.

At the same time, the business remains strong with a profit margin just under 30% of revenue over the past four quarters. What I like best about Activision is the recurring revenue that it generates. Three-quarters of its business comes from recurring sources, such as in-game purchases, subscriptions, and non-product sales. So its success doesn't depend on having to come out with brand-new products. It can simply build off the success of titles it already has, including the Call of Duty franchise. 

The biggest operational problem for the company at the moment has been news that two of its popular games, Diablo IV and Overwatch 2, will be delayed with minimal (if any) revenue likely coming from those titles in 2022. But the delays in releasing games and the bad press swirling around the company ultimately are short-term problems.

At around $59, shares of the gaming stock are down near their 52-week lows, making for an attractive contrarian buy right now. The shares also pay a modest dividend of 0.8%. For long-term investors, this could be a reasonable stock to take a chance on right now.