Is it possible to be notified before a task is due, similar to how you can set notifications for events on Google Calendar?
Google Tasks does not provide email alerts.
As mentioned by @Antoops, you can set alerts for Google Calendar events which may provide the functionality you are looking for.
It would be nice to see Google add the ability to set alerts for tasks, but I think they have left it out on purpose (since a task list is something you should check regularly by design vs. being pushed alerts/reminders)
This support thread has further reading on this feature request.
Here's a short script I wrote that takes tasks that have a due date, puts them on the calendar (7 am) and marks them as done! (then you'll get a calendar alert for them .)