The moment someone is going through a difficult time, is not the moment to share your positive philosophy. The most important thing to do is to acknowledge how someone is feeling and just be there for them. It's called meeting people where they are at.
In the weeks, months, or years to come, when they want to reflect on the impact of those hard times; then go for it! Timing is everything!
Offering positivity at the wrong time without acknowledging someone's reality becomes toxic positivity. This will push people away and leave them feeling like you don't really understand or care about them.
There is a time and a place for everything, use your positivity wisely!