<PAGE>

                                                                    Exhibit 10.5

                         FORM OF TAX SHARING AGREEMENT

   This TAX SHARING AGREEMENT (the "Agreement") by and among Endo
Pharmaceuticals Holdings Inc., a Delaware corporation ("Endo") Endo Inc., a
Delaware corporation and wholly owned subsidiary of Endo, and Endo Pharma
LLC, a Delaware limited liability company ("Endo LLC"), is effective as of
this    day of   ,   .

   WHEREAS the members of Endo LLC have agreed to exchange the shares of
common stock, par value $.01 per share, of Endo ("Endo Common Stock") currently
beneficially owned by them for membership interests of Endo LLC;

   WHEREAS under the Parent Plan certain officers and employees of Endo have
been granted stock options exercisable against Endo to purchase newly issued
shares of Endo Common Stock in certain circumstances;

   WHEREAS Endo and Sub entered into an Agreement and Plan of Merger with
Algos Pharmaceutical Corporation, a Delaware corporation, on November 26,
1999 (as may be amended and restated from time to time, the "Merger Agreement");

   WHEREAS, in connection with the Merger, employee stock options granted or to
be granted under the Parent Plan will be amended as provided in Section 5.9 of
the Merger Agreement in order to provide that such options will be exercisable
solely into shares of Parent Common Stock that are beneficially owned by
certain holders of Parent Common Stock immediately following the Parent
Recapitalization and prior to the Effective Time (such amended options, the
"Endo LLC Options");

   WHEREAS the shares of Endo Common Stock to be delivered upon exercise of the
Endo LLC Options will be provided entirely by Endo LLC and not directly
or indirectly by Endo or any other Endo stockholder; and

   WHEREAS under the Internal Revenue Code of 1986, as amended (the "Code") and
the Treasury Regulations, rulings and other interpretations thereunder,
deductible compensation expense resulting from the exercise of a Endo LLC
Option by an Endo officer or employee is treated for income tax purposes as a
deduction of Endo;

   NOW, THEREFORE, in consideration of the premises, representations,
warranties and agreements herein contained, the parties agree as follows:

                                   ARTICLE I

                                    PAYMENTS

   Section 1.1 Payments to Endo LLC.

   (a) Upon the occurrence of a Liquidity Event, Endo (or any successor entity)
shall pay to Endo LLC or its designees by wire transfer in immediately
available funds in U.S. dollars the Tax Benefit Amount to the extent such Tax
Benefit Amount has not previously resulted in a payment under this Section 1.1.

   (b) For purposes of this Agreement, "Liquidity Event" shall mean any
transaction or series of transactions resulting in (A) a sale of greater than
20% on a fully diluted basis of the common equity of Endo through (i) a
--------


                                       1
<PAGE>

primary offering by Endo, (ii) a secondary sale of Endo Common Stock by Endo
LLC or other holders of Endo Common Stock pursuant to a registration rights
agreement or (iii) a combination of primary and secondary offerings described
in clauses (i) and (ii) of this subsection, (B) a Change of Control or (C) a
sale of all or substantially all of the assets of Endo.

   (c) For purposes of this Agreement, "Change of Control" shall mean (i) any
merger, consolidation or other business combination that requires the approval
of holder of Endo Common Stock, (ii) any transaction or series of transactions
resulting in an acquisition by any Person (or Persons acting in concert)
unrelated to Endo LLC or its Affiliates of greater than 50% of the equity of
Endo measured by vote or value on a fully diluted basis or (iii) the
consummation by Endo of a plan of complete liquidation or a dissolution of
Endo.

   (d) For purposes of this Agreement, "Tax Benefit Amount" means the
cumulative excess (if any) of (A) the Taxes that would have been payable by
Endo and its Subsidiaries for all taxable periods or portions thereof after the
Effective Date if none of the Endo LLC Options had been exercised over (B)
the actual Taxes payable by Endo and its Subsidiaries for such periods. For the
avoidance of doubt and for purposes of this Section 1(d), in order to determine
the Tax Benefit Amount for any taxable period of Endo and its Subsidiaries in
which a net operating loss carryforward deduction ("NOL") is utilized, the
portion of the NOL attributable to deductions resulting from the exercise of
Endo LLC Options shall be treated as utilized last. By way of example, and
solely for the avoidance of doubt, if Endo has a loss for tax purposes in Year
1 of $100, consisting of $65 of deductions attributable to the exercise of
Endo LLC Options and $35 of deductions attributable to interest expense, and
in Year 2 Endo has $40 of taxable income prior to application of the NOL, $35
of the $40 NOL applied against Year 2 income will be deemed to be attributable
to the interest expense and $5 of the NOL will be deemed attributable to the
exercise of the Endo LLC Options. Therefore, the Tax Benefit Amount would be
the Taxes that would have been payable by Endo if its NOL in Year 2 had been
only $35. The NOL carryforward to Year 3 of $60 would then be treated as
consisting entirely of deductions resulting from the exercise of the Endo
LLC Options.

   (e) The parties hereby agree that no payments shall be made and no rights to
any payment shall accrue to Endo LLC under this Agreement until the
occurrence of a Liquidity Event, if any, and that Endo and its Subsidiaries
shall not credit to an account of Endo LLC or any other Person, set aside
any funds or assets, or otherwise make available to or subject to a claim of
Endo LLC or any other Person any amounts hereunder until such amounts become
payable to Endo LLC pursuant to Section 1.1(a) hereof.

   (f) The parties hereby agree that, notwithstanding anything herein to the
contrary, (i) any payments made pursuant to this Section 1.1 shall be treated as
payments described in Section 302 of the Code and shall take no position
inconsistent with this treatment for any tax purpose and (ii) no amount shall be
payable hereunder, and Endo LLC shall not be entitled to any payment hereunder,
to the extent any such payment is not permitted under Endo's Senior Credit
Facility, unless or until such time as such payment is either permitted under
the Senior Credit Facility or the Senior Credit Facility is terminated. For
purposes hereof, "Senior Credit Facility" shall mean the Credit Agreement dated
as of August 26, 1997, by and between Endo Pharmaceutical Inc., and The Chase
Manhattan Bank, as amended, restated, modified, renewed, refunded, replaced, or
refinanced, in whole or in part, from time to time.

                                   ARTICLE II

                               GENERAL PROVISIONS

   Section 2.1 Survival This Agreement shall survive until the later of (a) the
close of the last taxable period of Endo or any successor to Endo in which a
deduction may be allowable to Endo or its Subsidiaries or their successors as a
result of or attributable to the exercise of an Option or (b) the payment by
Endo of all amounts payable under Section 1.1 hereof.

   Section 2.2 Notices. All notices and other communications hereunder shall be
in writing and shall be deemed given when delivered personally, one day after
being delivered to an overnight courier or when

                                       2
<PAGE>

telecopied (with a confirmatory copy sent by overnight courier) to the parties
at the following addresses (or at such other address for a party as shall be
specified by like notice):

   (a) if to Endo or Sub, to:

   Endo Pharmaceuticals Holdings Inc.
   223 Wilmington-West Chester Pike
   Chadds Ford, PA 19317
   Attn.: Carol A. Ammon
   Fax No.: (610) 558-9683

   (b) if to Endo LLC or Kelso & Company:

   Kelso & Company
   320 Park Avenue, 24th Floor
   New York, New York 10022
   Attn.: James J. Connors, II
   Fax No.: (212) 223-2379

   and with copies to:

   Skadden, Arps, Slate, Meagher & Flom LLP
   Four Times Square
   New York, NY 10036-6522
   Attn.: Eileen T. Nugent Esq. and David Rievman Esq.
   Fax No.: (212) 735-2000

   Section 2.3 Interpretation. When a reference is made in this Agreement to a
Section, such reference shall be to a Section of this Agreement unless
otherwise indicated. The headings contained in this Agreement are for reference
purposes only and shall not affect in any way the meaning or interpretation of
this Agreement. Whenever the words "include," "includes" or "including" are
used in this Agreement, they shall be deemed to be followed by the words
"without limitation."

   Section 2.4 Counterparts. This Agreement may be executed in counterparts,
all of which shall be considered one and the same agreement, and shall become
effective when one or more counterparts have been signed by each of the parties
and delivered to the other parties.

   Section 2.5 Entire Agreement; No Third-Party Beneficiaries. Except for the
Merger Agreement and the Mutual Confidentiality and Non-Disclosure Agreement
between the parties dated October 21, 1998, this Agreement is the entire
agreement and supersedes all prior agreements and understandings, both written
and oral, among the parties with respect to the subject matter hereof. This
Agreement is not intended to confer upon any Person other than the parties
hereto any rights or remedies hereunder.

   Section 2.6 Governing Law. This Agreement shall be governed by, and
construed in accordance with, the laws of the State of Delaware, regardless of
the laws that might otherwise govern under applicable principles of conflicts
of laws thereof. EACH OF THE PARTIES HERETO IRREVOCABLY WAIVES ITS RIGHT TO A
TRIAL BY JURY IN ANY ACTION, PROCEEDING OR COUNTERCLAIM ARISING OUT OF OR
RELATING TO THIS AGREEMENT OR THE ACTIONS OF ENDO, ENDO LLC, OR SUB IN THE
NEGOTIATION, ADMINISTRATION, PERFORMANCE AND ENFORCEMENT THEREOF.

   Section 2.7 Assignment. Neither this Agreement nor any of the rights,
interests or obligations hereunder shall be assigned by any of the parties
hereto (whether by operation of law or otherwise) without the prior written
consent of the other parties. Subject to the preceding sentence, this Agreement
will be binding upon, inure to the benefit of and be enforceable by the parties
and their respective successors and assigns.

                                       3
<PAGE>

   Section 2.8 Severability. If any term or other provision of this Agreement
is invalid, illegal or incapable of being enforced by any rule of law, or
public policy, all other conditions and provisions of this Agreement shall
nevertheless remain in full force and effect so long as the economic and legal
substance of the transactions contemplated hereby are not affected in any
manner materially adverse to any party. Upon such determination that any term
or other provision is invalid, illegal or incapable of being enforced, the
parties shall negotiate in good faith to modify this Agreement so as to effect
the original intent of the parties as closely as possible in a mutually
acceptable manner in order that the transactions contemplated by this Agreement
may be consummated as originally contemplated to the fullest extent possible.

   Section 2.9 Modifications, Supplements and Amendment. This Agreement may be
modified, supplemented or amended from time to time by the parties hereto;
provided that any such modification, supplement or amendment must be approved
by a majority of the members of the Board of Directors of Endo who do not then
(by themselves or through an Affiliate) have a financial interest in the Parent
LLC or otherwise have a financial interest in any payments that may be made by
Parent or any successor to Parent hereunder).

   Section 2.10 Definitions. Terms not otherwise defined herein have the
meaning given such terms in the Merger Agreement.

   IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be
signed by their respective officers thereunto duly authorized all as of the
date first written above.

                                          ENDO PHARMACEUTICALS HOLDINGS INC.


                                          By: _________________________________
                                            Name:
                                            Title:

                                          ENDO INC.


                                          By: _________________________________
                                            Name:
                                            Title:

                                          ENDO PHARMA LLC


                                          By: _________________________________
                                            Name:
                                            Title:


                                       4