Prasad,
We have often tried to impress our Readers that masturbation per se is not a problem, it becomes one, when you get addicted to it, which unfortunately you admit you have been. Coupled with drugs, this is a huge receipe for depression and cloistered living.
It is obvious you are making serious effort to break from this routine. The fact that you have given up drugs is a positive indication and shows that you will successfully rid yourself of your masturbation habit too. You do need help though and your best friend can be your girlfriend. Depending on your bond, explain to her, what you have been through and seek her support.
Do not think too far ahead. Sex after marriage will happen. Why should you think of a 3 month cooling period etc?
Since you do get an erection at times, there is no fear of chronic ED. But continue with your physical exercises. Loos weight and see your confidence bloom.
You can do it.