There's a whole process of doing research, and part of the research is having a research ethics board by a university approve it. Part of it would be how you would recruit people.
I think in a study like this it would be very difficult, because you would have biases, and if you have dog-friendly people who take the study and do well, the people reviewing it later on might say there's a bias in the people you selected.
I can't speak to how I would design the experiment per se, but what you would have to do is randomize people. You would have to give some people dogs, you would have to compare it to regular therapy, and you would have to control for all of the factors that are going on in people's lives. It's complicated.