It said the teacher was undergoing counselling from January last year "to enable her to process and confront a traumatic experience that occurred earlier in her life".
She was on two anti-depressant medications and could not sleep more than four hours a night for three months.
"She described suicidal ideation that we accept is a well-documented potential side-effect of antidepressants," the tribunal said.
"On April 18 [2016] the respondent had a crisis. That evening about 8.30pm she met Student A by chance outside some shops. He asked her if she was okay and if she wanted to talk.
"The respondent took him up on his offer and they walked and talked until about 11.30pm.
"The respondent told Student A about what had happened to her during her childhood. The respondent told him that at that stage she felt it would be kinder for her young daughter if she ended her own life.
"The respondent says that Student A helped put this into perspective and they continued to discuss 'life, the universe and everything'."
After the incident, the teacher offered to move the boy to another history class, but he asked to stay in her class and she agreed. She did not tell the school or the boy's parents about what had happened.
She later exchanged text messages with the boy "on numerous occasions, largely about school and school work and queries he had about further education, but also about other things when either of them 'simply needed someone to talk with'".
"On one occasion the respondent took Student A rock climbing. She said this was to thank Student A for his compassion," the tribunal said.
"She also gave him a ride home from school on four or five occasions."
The relationship came to light when the teacher emailed the school counsellor about the boy and disclosed that he had helped her.
The school realised that the relationship was inappropriate but gave her "full support".
"Her principal describes the respondent as an outstanding teacher and one of the best he has had the privilege of working with," the tribunal said.
"Student A's parents are supportive of the respondent. They have expressed their views that the respondent's relationship with their son was not inappropriate and stated that they are grateful to the respondent for her efforts as Student A's teacher."
The tribunal found that the teacher committed "serious misconduct" which "reflects adversely on her fitness to teach" and "brings the teaching profession as a whole into disrepute".
It censured her for her misconduct.
However, it found that her actions were "very much at the lower end of the seriousness spectrum" with "powerful extenuating circumstances".
It allowed her to continue teaching on condition that she continues to attend medical and counselling appointments, provides medical and counselling information to the school on request, meets with a mentor once a week for two years, and "is to only have contact with students in person at the school or electronically through the school email account".
She was also ordered to pay $1840 towards the costs of the case. All names and the name of the school were suppressed.
Where to get help:
• Lifeline: 0800 543 354 (available 24/7)
• Suicide Crisis Helpline: 0508 828 865 (0508 TAUTOKO) (available 24/7)
• Youthline: 0800 376 633
• Kidsline: 0800 543 754 (available 24/7)
• Whatsup: 0800 942 8787 (1pm to 11pm)
• Depression helpline: 0800 111 757 (available 24/7)
• Rainbow Youth: (09) 376 4155
• Samaritans 0800 726 666
• If it is an emergency and you feel like you or someone else is at risk, call 111.