There’s no indication that he rejected the dark side.
His beef was with Palpatine, specifically. Like pretty much everyone in this series, but even moreso than most, he was a victim of Palpatine and wanted revenge, and in his dying moments he took comfort in the idea that Luke would eventually carry out that revenge.