What should I do

I met this guy and we clicked as soon as we started talking I liked him so much but then found out he had a gf. He continued lowkey flirting with me and I couldn’t stop myself either. Now he says he loves his gf and what he said to me was just a joke and it was because of the atmosphere. I feel like an idiot telling him I like him and now I accepted his friendship. I literally give him advice about his gf now lol. I recently broke up from a 3 year relationship and this guy made me happy after so long. He felt so perfect. Idk what to do. I kind of still want him.