How can I extract labels from the raw .bdf file (DEAP dataset)?

I don’t know this dataset either, but usually BDF files do not have annotations. Instead, there should be an analog trigger (stimulation) channel which you can use to create annotations and/or events: Parsing events from raw data — MNE 0.22.0 documentation