BMX legend Dave Mirra suffered from depression and heavy drug abuse before he died ... his family told law enforcement.
TMZ Sports has obtained the medical examiner's report -- confirming the 41-year-old shot himself in the head on Feb. 4th with a .38 Smith & Wesson revolver.
Witnesses told police Mirra had been hanging out at his friend's house that day when he walked out and went to his truck. His friends went to search for him and found him dead in his truck in the driveway, with the gun in his right hand.