It's hard to decide,
If it is your friend and you know what he has done, you will have second thoughts if you will lend him money. There are things to consider first like asking him what he will do and if does he realize his priorities, the things he needs to do and if he is ready to leave gambling after that.
There's a huge stress that he currently faces after his loss, and I think finding a job will take time since blaming himself will be there, for all those stress to be removed, there should be someone from his loved ones to support and guide him to the right path for that to happen.
But we cannot lend him money if that money will be used for gambling because that is not a solution for him. I think he will use the money to continue gambling, but if he can promise not to apply for gambling, I might lend the money to him. I say that because I realize that sometimes that person will lie to other people so they can get the money and I don't like it if they have to lie to borrow the money.
As a friend, maybe we can suggest to him not to give up on searching for a new job, or if we can help him, that will be worth him. We can give the money to him to buy food while he searches for the job, and I guess that will help him to survive for a few days until he can get a new job.