The Ardas ends by asking for chardi kala and sarbat da bhala: rising spirit, and the welfare of everyone.
Chardi kala is usually translated as high spirits or optimism and neither is right. It is closer to a state of resilience that does not depend on circumstances, held as an obligation rather than as a mood. A person is expected to be in chardi kala at a funeral.
It is the reason Sikh funerals do not conventionally involve loud mourning, and why the response to a disaster is usually a langar rather than a vigil.
It is also invoked so constantly that it can function as an instruction not to express distress, which is a real cost and is not much discussed.
Sarbat da bhala, the other half, asks for the welfare of all, not of Sikhs. It is the last line said in every gurdwara in the world every day.
The phrase closes the Ardas: the mind in high spirits, and the welfare of all. It is a petition and not a description.
It is used in ordinary speech and it is used at funerals, which is where the meaning is clearest. It is not optimism about the outcome. It is a stance held regardless of the outcome.
The eighteenth century is where the phrase gets its authority. A community that spent fifty years being hunted produced a formula about high spirits and put it at the end of its daily prayer.