Characterization of a broad energy germanium detector and application to neutrinoless double beta decay search in $^{76}$Ge