Just when Casper Smart thought 2016 couldn't get worse -- he totaled his Mercedes sports car, but on the positive side ... he was able to walk away from the nasty wreck.
Casper smashed into a guardrail and a tree in Woodland Hills, CA around midnight ... according to cops. The collision smashed in the driver's side of the car and deployed his airbags. Police say there were no other vehicles involved ... it appears he just lost control, and alcohol was not a factor.
Jennifer Lopez's ex was not injured -- kudos to Mercedes -- and actually posted a pic of his baby with "#wasntmyfault."
'Cause losing J Lo wasn't enough.