An inquest heard McElroy had accidentally taken a lethal cocktail of cocaine and painkillers on October 10 last year.
McElroy was prescribed strong medication to cope with pain she had suffered since giving birth 13 years ago.
However, an operation in 2017 made the pain worse. Her GP described her as "on edge" and "clinically depressed".
Police confirmed there was no evidence of self harm. They say her death was a tragic accident.
McElroy's heartbroken mum Fiona Hammett told the hearing: "My daughter was living alone with her three boys at the time of her death. Leanne had health problems, and she was in and out of hospital. We do know she was in a lot of pain.
"She had some difficulties after her first pregnancy and needed hospital treatment. She was a private person and liked to deal with things herself but was lovely and bubbly.
"I'm just shaken and saddened there are three children left behind. I'm very sad to see them separated, and I have applied for large council accommodation so I can have them more often — but I'm still waiting. Two of them are with their dad and the youngest with his dad."
WHERE TO GET HELP:
If you are worried about your or someone else's mental health, the best place to get help is your GP or local mental health provider. However, if you or someone else is in danger or endangering others, call police immediately on 111.
OR IF YOU NEED TO TALK TO SOMEONE ELSE:
• LIFELINE: 0800 543 354 or 09 5222 999 within Auckland (available 24/7)
• SUICIDE CRISIS HELPLINE: 0508 828 865 (0508 TAUTOKO) (available 24/7)
• YOUTHLINE: 0800 376 633 ,free text 234 or email talk@youthline.co.nz or online chat.
• NEED TO TALK? Free call or text 1737 (available 24/7)
• KIDSLINE: 0800 543 754 (available 24/7)
• WHATSUP: 0800 942 8787 (1pm to 11pm)
• DEPRESSION HELPLINE: 0800 111 757
• SAMARITANS – 0800 726 666.