If you have contemplated selling shares of some of the companies you own this year, you likely aren't alone. Considering how volatile the market has been, many investors find it hard to look beyond the current headwinds and focus on the long game. But no matter how tempting panic selling is, it is rarely (if ever) the correct move. 

The buy-and-hold strategy remains king for those looking to beat the market in the long run. It's especially wise to turn to dividend stocks since they have historically outperformed their non-dividend-paying peers. 

On that note, let's look at two excellent dividend stocks that you can buy and hold forever: AstraZeneca (AZN 0.39%) and Merck (MRK 0.25%).

Pharmacist handing medicine to patient.

Image source: Getty Images.

1. AstraZeneca 

AstraZeneca is a U.K.-based drugmaker with an exciting lineup of drugs, including an exciting oncology division. This unit features such medicines as Tagrisso, Imfinzi, and Lynparza. Last year, all three of these cancer therapies performed well. Sales of Tagrisso jumped 16% year over year to roughly $5 billion, while revenue from Imfinzi increased 18% to $2.4 billion. Lynparza's sales came in at $2.7 billion, up 23%. Overall, the company's oncology unit grew its sales by 19% year over year to $13.7 billion.

AstraZeneca's other segments also performed well. The company's cardiovascular, renal, and metabolism unit reported $8 billion in sales, 13% higher than in 2020. Also, AstraZeneca's rare disease unit grew its revenue by 8% year over year to $3.1 billion. And in July 2021, AstraZeneca acquired rare disease expert Alexion Pharmaceuticals in a cash-and-stock transaction valued at $39 billion.

The company got its hands on such products as Soliris and Ultomiris, which are approved to treat two rare blood disorders called paroxysmal nocturnal hemoglobinuria and hemolytic uremic syndrome. In addition, AstraZeneca inherited Alexion's pipeline. In 2020, Alexion's management said it expected 10 new product launches by 2023.

AstraZeneca has exciting programs of its own that predate this key acquisition. The company expects more than three-dozen regulatory submissions or decisions by the end of the year. Last year, AstraZeneca's total revenue grew by 41% year over year to $37.4 billion. The company's adjusted earnings per share (EPS) increased by 32% year over year to $5.29.

With the company's rich lineup and solid pipeline, investors can expect the pharma giant to expand its revenue base and consistently post robust revenue and earnings increases. Meanwhile, the stock currently offers a dividend yield of 2.09% compared to the S&P 500's 1.37%. And while it currently has a high cash payout ratio of 102.5%, the company expects to maintain or increase it.

AstraZeneca's cash payout ratio skyrocketed last year following its acquisition of Alexion Pharma. That's hardly surprising, but given the company's healthy business and focus on rewarding shareholders with dividends, it remains a top pick for income-oriented investors. Overall, AstraZeneca looks like an excellent stock to buy and hold

2. Merck

Merck is a leader in both human health and animal health. The company's lineup of pharmaceutical products features Keytruda, a cancer therapy that has racked up dozens of indications worldwide and continues to grow its revenue. The company also markets Gardasil and Gardasil 9, which are HPV vaccines. Last year, Merck's revenue from Keytruda was $17.2 billion, 20% higher than the previous fiscal year.

Merck's sales from Gardasil and Gardasil 9 increased by 44% year over year to $5.7 billion. The company's animal health unit reported $5.6 billion in revenue, 18% higher than the previous year. Merck's total sales were $48.7 billion, 17% higher than 2020. The company's adjusted EPS grew by 33% year over year to $6.02.

Merck boasts several promising pipeline programs, one of which is sotatercept, a potential therapy for a life-threatening blood vessel disorder called pulmonary arterial hypertension. Merck acquired sotatercept along with the company that originally developed it, Acceleron Pharma, in November 2021. The transaction cost Merck $11.5 billion in cash.

Merck currently boasts 28 programs in its late-stage pipeline alone. The company will benefit from the constant need for lifesaving medicines. In addition, the animal health industry is on an upward path as well. 

With an above-average dividend yield of 3.21% and a cash payout ratio of 68.4%, there is plenty of room for the pharma company to sustain and even increase its payouts for many years to come.