A Westmoreland County woman earlier this week pleaded guilty but mentally ill to trying to kill a child with fentanyl.