Many women experience the postnatal depression in the first few days after having a baby.
The infant was discovered when a local man heard its distressed cries wrapped in a bin bag and left to die.
Workers say the little lad was just seconds from death, as the waste was due to be scooped up by a truck.
The heart-breaking find was made in the town of Verulam, in eastern South Africa, on Monday.It is believed a local scrap collector found the baby and called the police.
The infant was taken to hospital for checks but is said to be in a healthy condition.
According to local media, police tracked down the suspected mother in a nearby property after interviewing residents.
The woman reportedly delivered the baby in her bathroom, while her 11-year-old son and nine-year-old daughter were at school and her parents were working.
The 31-year-old woman, who has been undergoing treatment for depression, was charged with child abandonment and appeared in court on Wednesday, according to reports.
She has not been named in order to protect the identity of the new-born and her two young children.
However she has been released on bail and will appear in court again on Wednesday, January 30.