Model, actress and radio personality Pearl Thusi was in a car accident that left her and her daughte.
The sentences will run concurrently.
Vinolia Siwa, 33, pleaded guilty in September to five counts of murder. She blamed the murders on poverty and the emotional abuse she experienced from her live-in boyfriend.
Passing sentence, Judge Ronald Hendricks said he took into consideration a state social worker's recommendation in herpre-sentencing report.
Social worker Marelize Vergottini earlier told the court that Siwa had experienced hardship raising her children as she was unemployed.
She said Siwa could not go to family planning because her boyfriend was against it and that she had once thought of aborting one of the children.
She told the court how Siwa was left with a small baby and a mentally challenged child needing constant care when her boyfriend and the father of her eldest two children, Robert Webb, died.
Her eldest son, Sizwe, who was 13 when Webb died, had cerebral palsy and a heart defect that needed constant treatment because he suffered severe epileptic attacks.
Vergottini said that in 2005 Siwa met Itumeleng Lesimola, with whom she fell in love and had three children.
Siwa's family did not approve of Lesimola. She moved out of her parental home into a two-roomed RDP house with Lesimola at Mountain View in Pampierstad.
Siwa had been diagnosed with different psychiatric illnesses and had gone to four different psychiatrists.
According to Vergottini's report, Siwa was diagnosed with acute psychosis, adjustment disorder with mixed disturbance of emotions, conduct related to psycho-social stressors and post-partem depression.
At the time of the murders Siwa was pregnant with her sixth child, who was born in prison earlier this year.
The child was later placed in foster care.
Vergottini said Siwa was regarded by her community as a responsible person who took care of and loved her children.
"Siwa was a church-goer but isolated herself from her family and neighbours.
"Although she was seen as an introvert, her family felt that Lesimola had something to do with her behaviour," said Vergottini.
According to the family doctor, a Dr Nel, Siwa was very upset when she found out that she was pregnant with her fourth child.
She asked for an abortion but never returned to the hospital to undergo the procedure. Her doctor encouraged her to undergo family planning but Siwa said her boyfriend would not approve.
Judge Hendricks said Siwa's crimes were serious and could not be ignored. He said Siwa needed time, therapy, counselling and appropriate medication because she could easily be a danger to herself and others.
"You are a first offender, you pleaded guilty and that shows remorse but five minor children lost their lives.
"They were defenceless and the eldest was physically retarded.
"The seriousness of these crimes must not be ignored. The children were looking up to you to take care of them and love them but the court must also consider that you were not in your right state of mind according to the social worker," he said.
The judge said the health condition of Siwa's eldest child must have added to her depression .
"His condition plus the other four children must have been emotionally draining on you. I believe, however, that you were not alone in this situation.
"You had a partner. You could have sought help from him or your family but decided to distance yourself from them," he said. - firstname.lastname@example.org