You need to take him to the vet and have him checked out ASAP. My inital thougts to the painful BM's and constipation was one of two things. 1) He's costipated for some reason and needs an enema to help clear his system, or 2) He has a blockage hence the difficult BM's and small amount being passed thru. With the vomiting in addition to the prior symptoms that's a sure fire sign of a blockage. Mind you I'm not a vet and I can't examine your pet thru the computer, but I have worked at a vet hospital and 98% of the time with those symptom it was a blockage. There's various causes for a blockage, usually it's because the pet ate a sock or similar object, but animals can get blockages from just thier regular food or hair from grooming. Blockages are not something that you can wait to just see if they'll pass it, they can become life threatening rather quickly. If it is a blockage your vet should do an X-ray and hopefully will be able to a forgein body. If there's nothing definitive on the X-ray then a barium series is recomened if the pet is stable enough. The barium is clearly visible on X-rays and will tell you if and where a blockage is. IV fluids are also a must since animals can get dehydrated very quickly when they're blocked.
Hopefully I haven't scared you too much, but it's extreemly importat that you get your pet checked by the vet ASAP.
Hopefully I haven't scared you too much, but it's extreemly importat that you get your pet checked by the vet ASAP.