Hello dear
I understand your concern
Your problem could be due to  
hormonal imbalance, fibroids, 
pelvic inflammatory disease, cystitis/UTI, 
endometriosis, ademomyosis.
I would suggest to consult the gynecologist and undergo  clinical examination, reproductive hormone analysis, USG scan, endometiral biopsy, vaginal swab test, urine tests to confirm the cause.
Specific treatment will depend on the cause.
Progesterrone preparation and 
tranexamic acid will help to reduce the bleeding.
Use K-Y based lubrication during the sex to reduce the pain
For 
urinary tract infection: proper antibiotic course, Tablet pyridium, syrup cital,
Drink plenty of water and juice of cranberry
Maintain proper pelvic hygiene before and after sex.
So consult the gynecologist and undergo proper investigations.
Hope this will help you
Best regards
Dr. Sagar