D0 (PA02) works like all other digital pins. You could check, if the Pin mode is set properly as GPIO. The PMUXEN bit (bit 0) at the Pin condfiguration register for PA02 address 0x41004400 (PORT base) + 0x42 (for PA02) must be 0. If that is fine, check the wiring of your board.
I know that the pin can be configured properly. I coded that myself. I do not know how these Arduino macros generate an address. The code I use is below, where pin is just the number of the pin. For PA02 this would be 2 for the pin number and 0 for the pin group. The PORT, PINCFG and PMUXEN are from the Atmel include files,
PA02 (A0) does not have any timers associated with it, so a PWM on that pin will need to be done in software indirectly. I believe the Arduino analogWrite() command
checks if pin is analog out, if so uses it. [Clearing PMUXEN should cause this check to fail]
checks if pin can have a HW timer/PWM attached - if so configures the timer for that pin to generate a PWM [not timer for PA02 (A0) so this fails]
else sets digital output (high or low) based on desired value
You can see the reference in (my linux directory) ~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3/cores/arduino/wiring_analog.c