I am not sure about the drug dihydrocodeine; it is not a familiar name to me. However, I recognize that codeine is an element of it. 40 of any pill is an excessive, way excessive, amount to take and seeing it has codeine in it, it is surely a serious problem. I have no doubt that the withdrawal from it would be severe. If it is 40 tabs a day, perhaps an outpatient program can help and withdrawal could be done at home. If it really is 40 at a time, your son belongs in a medical detox center.
I hope he recognizes the problem and does all he can to seek help. Looks like a full blown, serious addiction issue.
Best of luck