help!!! we left chip in the bathroom for 10 mins max and when i came home, he was crying his little heart out

we put him in the bathroom with all his toys, his bed, and food and water, and when i came back he had chewed through the plug for my charger and gone for a number 2 on his pad, which is good, but it was a consistancy i dont wish to go in to

what is the best way to get ur pup used to being on their own? as he needs to learn for when we go to work
PLEASE HELP!!!!