You're leaving? :(
Is it a polite or regular way to say 'bye' ? I've always been used to say 'chào' instead, and in any circumstances.
Yes, tạm biệt is the formal version. You will see this mostly in TV, books and also in conversation but less.
even more colloquial is just "bye bye" (bái bai)
道别（Dao Bie）in Chinese