bleeding

I have been very constipated and going to the bathroom has been very painful, I am 6w5d, after I went to the bathroom, I noticed that there was quite a bit of blood in the toilet after I pooped and when I wiped, I've never had this happen to me and I'm very nervous, anyone have any suggestion as to what I can do to ease the pain? I'm going to the doctor tomorrow, but I'm in lots of pain right now