For people with anxiety or depression, vitamin B6 might be able to help, a study suggests.