If you are penniless you may be eligible for a payment towards funeral expenses from the Social Fund. Find out more here. The funeral payment won’t cover the complete cost of a traditional funeral organised by a funeral director and it is hard to get.
You will have to make up the shortfall somehow.
If your spouse or civil partner has died younger than pensionable age you may be eligible for a Bereavement Grant of £2000 tax free.
More information here.
The more upfront you are about your situation, the more your funeral director will be able to help you with your application. So put your cards on the table from the word go.