A new type of diagnosis could make it easier to spot if someone may attempt suicide