While studying astrophysics in Edinburgh, Violet Piper was besieged by depression, anxiety, and thoughts of harming herself.