Corporations may not legally deduct the dividend payments before taxes but there is another approach - a corporate structure called an income trust. Income trusts allow a firm to deduct dividends, or trust payments, before taxes are calculated. The essence of an income trust is to pay all of the earnings after all business expenses to the unit holders, which are the owners of the income trust.
An income trust is essentially a corporation with a different classification under tax law. Income trusts are not permissible in most countries, but there are a few (Canada, for example) that still allow income trusts, or a variation thereof. Because trust payments are paid out to unit holders in a cash-distributions-per-unit format before taxes are calculated, the corporation will have no income against which to calculate income taxes, virtually eliminating its tax liability.
If you want to learn more about dividends, please read How and Why Do Companies Pay Dividends?