I think it’s by viewing everything as a gift. I even view bad things as a gift. Either because of what I’ll make of them or because they are a side effect of good gifts that they remind me of.
Pain and suffering are real but when they’re over or when we’ve learned to deal with them, it makes joy and pleasure that much better. It makes appreciating everything that doesn’t cause pain or suffering automatic. Pain and suffering are part of living, but living is a gift capable of so many other things. Pain and suffering are the cost of accepting the gift.