BASED on the information provided it seems you are having "an ACTIVE gastric / esophageal BLEEDING "
The dark black color stool is the blood that reacts to stomach acid and changes its color. The soar sensation is the pain due to the gastric acid
corroding the inner wall. The black mucous discharge is acid treated blood. Its kinda emergency PLEASE ACT SOON.
1) CONSULT SURGEON AS SOON AS POSSIBLE.
2) It may make you feel dizzy if to much blood is lost, please avoid any driving or any intense activity till you get your self checked.
is needed to find out the origin of the bleeding and to fix it.
Hope it helps to avoid any adverse condition.
Dr. JAY PATEL