In hymn he composed for the dedication of the Seventies Hall in Nauvoo in Dec 1844, W.W. Phelps made the first known public declaration of the doctrine of a Heavenly Mother:
A VOICE FROM THE PROPHET. "COME TO ME." BY W. W. PHELPS, ESQ. --TUNE -- "Indian Hunter." --
Come to me, will ye come to the saints that have died,
To the next better world, where the.
Come to me where the truth and the virtues prevail;
Where the union is one, and the years never fail;
Where a heart can't conceive, nor a nat'ral eye see,
What the Lord has prepar'd for the just: Come to me.
Come to me where there is no destruction or war;
Neither tyrants, or mobbers, or nations ajar;
Where the system is perfect, and happiness free,
And the life is eternal with God: Come to me.
Come to me, will ye come to the mansions above,
Where the bliss and the knowledge, the light, and the love,
Death, the wages of sin, is not here: Come to me.
Come to me, here are Adam and Eve at the head
Of a multitude, quicken'd and rais'd from the dead:
Here's the knowledge that was, or that is, or will be
In the gen'ral assembly of worlds: Come to me.
Come to me; here's the myst'ry that man hath not seen:
Here's our Father in heaven, and Mother, the Queen,
Here are worlds that have been, and the worlds yet to be:
Here's eternity, -- endless; amen: Come to me.
Come to me all ye faithful and blest of Nauvoo:
Come ye Twelve, and ye High Priests, and Seventies, too;
Come ye Elders, and all of the great company;
When you've finish'd your work on the earth: Come to me.
Come to me; here's the future, the present and past:
Here is Alpha, Omega, the first and the last;
Here's the fountain, the "river of life," and the Tree:
Here's your Prophet & Seer, JOSEPH SMITH: Come to me. (Times and Seasons 6 [January 15, 1845]:783, emphasis added)
For some useful resources on this doctrine, see:
The Church’s Gospel Topics Essay Mother in Heaven
Kevin L. Barney, How to worship Our Mother in Heaven (Without Getting Excommunicated) (cf. his shorter study, published by FairMormon, Do We Have a Mother in Heaven?)
Stephen Smoot, I've a Mother There