It should be:
"Wenn ich geblieben haette, waere ich gluecklicher (gewesen)"
note: the last gewesen in brackets is optional...you'd only use it if it wasn't going to be clear what you meant from the context (i.e. if it is not said, the sentence could be interpreted at "If i had stayed, i...