who are also psychic. The main character is immortal and finds a way out then finds a space ship and works on bring back humanity and I the end of the book he beats the thing that killed everyone with friendship. 

A:

The story is Arthur C. Clarke's "The City and the Stars".

It's about how in the past humanity discovered they weren't alone as well as being left behind

The story is about the remains of humanity, who decided, more than a billion years before the events of the novel, to remain on Earth when most of humanity left the galaxy.

humanity is split on a desert earth with two human remains

The story takes place about two billion years in the future, Earth has become a desert save for two places.

onegroup of immortal people with high tech

The people living in the city (Diaspar) live in bodies that are created for them by the city's central computer. The bodies themselves are not immortal, but at the end of their lives, the people upload their memories into the computer. When it's a person time to "live again", a new body will be created and, after their childhood, the memories of the person are implanted into the body.

The main character is immortal

He is an inhabitant of the city.

not immortal hippies who are psychic

The other place on earth, Lys, is home to "normal" humans, who have rejected most machines and are born, age and die naturally. They are telepaths who can communicate without words over great distances.

Then the races of the universe