Question: what episode does damon and bonnie come back?
Answer: After doing some magic under an eclipse, Bonnie sacrifices herself in order to push Damon into being into the real world in Season Six Episode Five. Thus, Damon is alive and well at the end of episode five and hugs Stefan.