“All things work to the good of those who love the Lord” is a Biblical alternative. It sounds similar, but in context we know it’s from an eternal perspective. It’d definitely not easy to look at things from that perspective, but it’s also a good reminder that no matter how things turn out, if God is real then when we’re with Him it will all seem like it was nothing compared to the reward. Might be a cold comfort in the moment, sadly, but it won’t be then.
For a non-Catholic, it depends. If they believe in the Bible too, then they’ll appreciate the scriptural reference too. If it’s someone who believes this life is all there is, I don’t know. But that’s just the fact of life: If this life is all there is, sometimes there’s no happy ending, and some people have miserable lives and it never gets balanced out. I completely understand why somebody would desperately want things to work out in THIS life, because even despite believing in Heaven most of us do hope this life will be great too. But there’s no honest or realistic way to promise anybody that, when there are tons of reasons to realize that’s not always true. I guess maybe focusing on psychological methods to be content even when things are hard, maybe. That’s something we Christians could benefit from too, to be more content in all circumstances, like St. Paul said. If a person is looking for happiness in this life, after all, their own mind is the only thing they have any power over.
I’m not saying we shouldn’t try to comfort people about things working out in this life, but we can only do that very well if we really DO see hope of things working out, and we’re giving them the real reasons why. We can’t just give them a one size fits all saying, like “Everything will fall into place.” You have to honestly believe there are reasons their own situation will fall into place, and then share those reasons. That works better than any platitude.