The actress had completed a stint in rehab before she died last month from an overdose, the coroner’s office said. Her death was ruled an accident.