I was going to suggest the same things that Memphismomma did. My Tilly had separation anxiety really bad. She still has it to a certain degree but nothing like she was. She would shake and pant when I put my shoes on, unless I've asked her to go bye bye, and then she would just poo everywhere. We still have the problem with the pooping while we are gone. If we walk out to the car then realized we forgot something, by time we come back in Tilly would have had an accident. I took her to the vet and he gave me medication to put her on. I HATED it! I wouldn't recommend this. I felt like all I did was drug her up. She wasn't herself and just wanted to sleep all day as I think it relaxed her too much.

I hope you find your answer. I'd search on here for separation anxiety as I think this pretty common.