What advice would you give to someone who is going through a difficult situation that they think they can't handle?
First, just be present and empathize.
Secondly, give them messages such as, "You're stronger than you think", "This too shall pass", "You can do this", etc.
Finally, help in any concrete way that you can and that they want you to.
What it boils down to is that unbelievers are no less equipped than believers to weather difficulties, and believers are no MORE equipped either (they just think they are). Everyone labors under the same limitations and anxieties. The advantage of the unbeliever is that they should be free of the learned helplessness of religious faith, they should at least potentially have more options available to them since they are also free of the arbitrary constraints of religious faith, and, in my experience, their unbelieving friends are less likely to judge them. And, not least: the solutions they are apt to choose are more likely to be good ones. Religion is often telling you to keep doing things you've done a thousand times before that don't work or don't help, or both: pray, have faith, give money you don't have, etc.
On the other hand, it IS tough when someone still has religious tropes or their equivalents directly or indirectly lodged in their brains. For example if someone is going on and on about how unfair what they're going through is, I can acknowledge the unfairness and that it sucks, but if they feel entitled to fairness or comfort or clarity, then I have to gently steer them back to the uncomfortable truths: life has to guarantees, owes you nothing, and it entirely indifferent to your suffering. And then get back to doing actionable things about the actual problem as best as one can.
Those "uncomfortable truths" don't compete well with religion's "comforting lies" but have the advantage that they conform to reality and are relatively predictable. Suffering, for an unbeliever, is largely an exercise in lowering expectations and correcting bad assumptions, especially if they come from a religious background.
It's okay to seek help. You don't have to do this alone.
I really like this approach. It's short and simple without passing the buck or giving up.