When does the marriage end

When does the marriage end (DOS or DOD) for purposes of equitable distribution, especially for the valuation of property and debt; retirement accounts; medicare; and social security benefits?

Assets are valued as of the date of separation. The marriage does not end until the entry of an absolute divorce.

If assets are valued as of DOS, when are they re-valued by active and/or passive gains and/or losses?

They are not re-valued, but passive gains and losses are also divided up to DOD.

What criteria are used for distribution of passive and active gains or losses in value of property?

Any passive gain or loss is divided equally.

Do I understand this correctly?

Marital Property is divided equitably.
Passive gains and losses in Divisible Property are divided equally.

What about active gains and loses in divisible property?

Active gains belong to the party who caused the gain and are not divided.

Earlier in the thread the issue of social security was mentioned. Does an ex receive a portion of a spouse’s social security? What about a company pension not due to be paid out until years after an absolute divorce (or a date of separation)?

Social Security can be awarded to a former spouse if the marriage lasted 10 years or more. The state courts cannot address this benefit however as SS is controlled by Federal Law. Application would have to be made to the SSA for benefits.
A pension can be divided pursuant to a court order called a Qualified Domestic Relations Order, and benefits can be paid to the former spouse when the commence.