Rest for a long time is a good approach. You may add come exercises which increase the groin blood circulation. Some breathing exercises will help you for genera tuning up of your body.
Try to let your body heal without the addition of medications. It would be best if your body can regain its tone without relying on being bolstered by meds, if possible. It's hard to say how long it will take for your body to adjust. If you get intimate in a caring fashion, caressing and massaging your partner's body, then you may discover that is much better than going solo.
How much time will it take to regain normal sexual activities ?
Do I need to get some medications or solely leaving masturbation will solve the problem ?
You recognize what must be done in your situation. You should stop your masturbation to pornography. Intercourse and other sexual activities with another person will feel quite different from solo sex, that is, masturbation. Give your body time to become accustomed to the newer sensations. If necessary, in the meantime, satisfy your partner by oral means.