We’ve all been in the situation where advice is the last thing we need to hear.
Instead, recognise their struggle or what they’ve just said and invite them to keep talking. A person would not bring up suicide unless they are going through an extremely distressing period in their life.
While listening, check on how they’ve coped so far and explore what resources they've tried so far.