Foreskin and bleeding

Patient: Recently, during foreplay with my wife, I was rubbing the penis against the vagina when the foreskin detached from the head of the penis and there was bleeding. Please advise external or oral medicines to cure the injury. Also, what precautions should I take in the future?