Yes certainly whatever makes one turn towards and seek the Divine, even if it be for material goods or well-being is fine. But for this to last turn this vairagya of recoil from world pain due to disappointments, into a sattwic vairagya that shows us how ephemeral, temporary and transient earthly happiness is. It will sustain the journey and one day turn from a negative to a positive turning towards the Divine.
Affectionately,
Alok Da