Ref. No. 38/790
In the name of Allah the most Gracious the most Merciful
The answer to your question is as follows:
Losing everything in the gamble is a loss in business. Then taking another chance is to remain in business, and going for the prayer is to pay attention to Allah in case of the loss, whosoever advances to Allah in loss there is increase in his life and wealth, therefore observe optional prayers, spend as charity and philanthropy and so strengthen your relations with Allah; you will also gain profit in your business in-Sha-Allah.
And Allah knows best.
Darul Ifta
Darul Uloom Waqf Deoband