In prosecutions for murder, after the prosecution has proved that a defendant committed the homicide, the burden of proving circumstances of mitigation, or that justify or excuse it, passes to the defendant, unless the proof of the prosecution shows that the crime committed only amounts to manslaughter or that the defendant was justified or excused.
SDCL 23A-22-5