
462 So.2d 507 (1984)
Vincent P. MIRAGLIA, Appellant/Cross Appellee,
v.
Eileen MIRAGLIA, Appellee/Cross Appellant.
No. 83-1319.
District Court of Appeal of Florida, Fourth District.
December 28, 1984.
Rehearing Denied February 8, 1985.
James J. Butler, Stuart, and Joan M. Bolotin, Greene & Cooper, Miami, for appellant, cross appellee.
W.E. Gary, Stuart, and Edna L. Caruso, West Palm Beach, for appellee, cross appellant.
LETTS, Judge.
Pursuant to a dissolution proceeding, both mother and father seek "primary" custody of three children. The trial court declared the mother the victor, in part to help her resolve admitted emotional problems. We disagree with that declaration and remand for further proceedings.
Children should never be used as a substitute for formal psychiatric treatment in order to help transform an unstable and unhappy home into a stable, happy one. Bienvenu v. Bienvenu, 380 So.2d 1164 (Fla. 3d DCA 1980); and see Sherrod v. Sherrod, 448 So.2d 1234 (Fla. 1st DCA 1984) and Ashleman v. Ashleman, 381 So.2d 364 (Fla. 4th DCA 1980). In this regard, the best interests of the children must take precedence over those of their parent or parents. The record before us is replete with testimony that life with mother was difficult. For instance, during the pendency of a requested rehearing on the final judgment the mother attempted suicide and, arising therefrom, "temporary" custody was awarded to the husband, a transfer which for aught we know still pertains.
The attempted suicide raises another aspect of this cause. The final judgment gave primary custody to the mother, yet, as we have noted, the court understandably switched that custody to the father upon learning, by way of emergency motion, of the mother's attempt on her own life. Notwithstanding, the same court, one week after the ordered switch, denied the petition for rehearing, thereby in effect reaffirming the primary custody in the wife.
We can all agree that the polestar in these matters is exclusively the welfare of the children, but that star is obscured here by events which cloud the record and strongly suggest those best interests were not served. However, we stop short of outright reversal. This trial judge was on the firing line which we were not. We, *508 therefore, content ourselves with asking him to reconsider the matter in the light of this opinion and receive such further evidence as he deems appropriate.
Another point we consider is the court's refusal to admit the testimony of the wife's long-time psychiatrist, based on the privilege enunciated in Section 90.503(4)(c), Florida Statutes (1983). The father argues that by alleging her fitness to have custody, the wife introduced her mental condition and waived the privilege. At the time the trial judge rejected this contention, he was faced with a situation on all fours with the one existing in Roper v. Roper, 336 So.2d 654 (Fla. 4th DCA 1976), and his ruling was correct. However, subsequent to this ruling, unfolding events reflected the suicide attempt which we believe caused the wife's mental health to be "vital to a proper determination of permanent custody." See Critchlow v. Critchlow, 347 So.2d 453, 455 (Fla. 3d DCA 1977). Accordingly, we direct this testimony be admitted upon remand.
To insure that the best interests of the children are given due consideration, we urge the trial court on remand to appoint for the children a guardian ad litem who has been trained pursuant to the guardian ad litem program promulgated by the Office of State Courts Administrator.
REMANDED FOR A FURTHER EVIDENTIARY HEARING. IN ALL OTHER RESPECTS THE JUDGMENT IS AFFIRMED SUBJECT TO POSSIBLE CHILD SUPPORT MODIFICATIONS IF CUSTODY IS TRANSFERRED.
GLICKSTEIN, J., and SCOTT, ROBERT C., Associate Judge, concur.
