Former staff sergeant Stuart Seib, 54, pleaded guilty to breach of trust and resigned from the RCMP last year.
The court heard that Seib, formerly the commander of the Merritt RCMP detachment, first used stolen cocaine in 2010 when he was a sergeant at the Clearwater detachment.
His lawyer, Neville McDougall, said that Seib had been suffering from post-traumatic stress disorder after attending a motorcycle fatality involving a young girl Seib knew personally.
"You know, it's something that police officers deal with all the time. And it's only now, say in the last five to 10 years that we are hearing so much of post-traumatic stress disorder with police officers," McDougall said.
Seib also stole cocaine from an evidence locker in Merritt in 2012. In the end, Seib called his supervisors and told them he had been using cocaine to self-medicate for his depression.
"Turning himself in got himself on the path to recovery, and it's unfortunate it took that," McDougall said.
The Crown stayed a charge of theft under $5,000.
Seib held his wife's hand as the judge read out her ruling in a Kelowna courtroom Tuesday.
Provincial court Judge Jane Cartwright handed Seib one year of probation to go with the conditional discharge, and ordered him to perform 50 hours of community service.
A conditional discharge means Seib will not have a criminal record if he obeys his probation orders.
He was also ordered to continue with counselling for drug addiction and mental illness.
"He's taken ownership of this right from the outset," McDougall said. "He's happy to have this in his past as much as it is, and he's happy to try to move on now with his continued counselling."