That depends on your contract terms. If your contract says nothing about compassionate leave, any time off will depend on the goodwill of your employer.
However, your employer should take a consistent approach when deciding issues like this – having clear rules and following them fairly. Your employer must not discriminate against you when deciding whether to agree to your request, or break the implied duty of fundamental trust and confidence in every employment contract.
In practice, when someone close to you dies, the last thing you want to do is trawl through contracts of employment and policies to see whether you have a right to take time off for bereavement. Some good employers (especially where a union is recognised) do offer some time off, paid and unpaid, usually around five days in a year.
However, there is currently no statutory right to bereavement or compassionate leave.
The law will change on this soon, although not everyone will benefit – From April 2020, employed parents are to be given a right from the first day of their job to two weeks’ leave if they lose a child under the age of 18 or suffer a stillbirth from 24 weeks of pregnancy. Employees with 26 weeks’ continuous service are to receive paid leave at the prevailing statutory rate, while other staff will be entitled to unpaid leave.