A sincere smile/warm greeting usually elicits one in return.
It's nearly impossible to smile or laugh while harboring negative or depressing thoughts. Among the other mood altering tips often given are exercise, sex, listening to music, watching comedic TV shows or movies and socializing with friends.
Laughter causes a release of so-called endorphins.
Generally speaking happy positive people attract others while sullen dour people repel them.