hi there, you seem to be contipated and due to that there are hard stool called scybale formation, when you pass such hard stools you tend to get pain and are prone to fissure formation which explains the blood and pain or discomfort near your anus. You have to make a drastic change in your food habit and lifestyle. You need to totally cut down on refined food and change to consuming plenty of fibrous fruits and vegetables along with 2-3 litres of water a day. Take some sort of exercise like walking or aerobics
. You can ask your physician to prescribe some mild laxative for daily intake to regularise your bowels. Make it a habit to empty your bowel atleast once in two days. Take care.