The former SNP MP said she feared she was ‘losing it’ while at Westminster