The obvious answers are the words you've mentioned, but with un prepended: unpopular or unwanted .
ell.stackexchange.com/users/54962/Trent Bing
You could easily say that "people (at work) avoid him", but if you want to use an adjective (grammatically speaking a past participle used as an adjective) you could use shunned .
Definition of shun: in the wiktionary : "to avoid, especially persistently."
in Cambridge online : "to ignore someone and not speak to that person because you cannot accept their behaviour, beliefs, etc.
"
Here are examples of the use of the word in this context:
In a book about Michael Jackson: A man who won eight Grammys just four years earlier was shunned on that night;
( Michael Jackson & the Music That Was , The Voice of One, 2016)
In a conversation in a contemporary "romance": My mother, you see, was shunned when she became pregnant with Roland and me.
( Mated in Mist: A Paranormal Shifter Talon Pack Romance , Carrie Ann Ryan, 2016)
In an autobiography: At play time I was shunned.
The boys and girls didn't want to talk to me.
( He Touched Me: An Autobiography , Benny Hinn, 2001)
In a detective novel: You knew what would happen to his family if he was shunned.
( Roots of Murder , Janis Harrison, 1999) In the written press: Those born on Skye are shunned if they say anything against the wind farm.
They no longer exist.
( The Telegraph - 05/06/2005)
They survived Ebola.
Now they are shunned ( The Washington Post , 13/08/2014)
ell.stackexchange.com/users/2818/None
What about unwelcome ? unwelcome : not wanted or welcome &bullet;
unwelcome news &bullet; an unwelcome guest (M-W)
This is especially apt if you are trying to join some groups or activities.
I think the simple avoided could work:
avoid transitive verb 1 a : to keep away from : shun &bullet; They have been avoiding me.
(M-W) Ignored could work, especially if you are actively trying to get everyone's attention or approval.
In my opinion, the first part of the sentence implies that it is because you are not wanted.
ignore transitive verb 1 : to refuse to take notice of (M-W)
ell.stackexchange.com/users/36187/Em.
There are some good answers, but I wanted to add Pariah to the mix.
one that is despised or rejected In your sample sentence, it would read like:
My friend is always wanted while I am always (treated like) a pariah.
It is pretty strong though.
You wouldn't necessarily use it to describe a one-off situation, rather if the rejection was a fairly regular occurrence.
ell.stackexchange.com/users/29859/Obsidian Phoenix
If you want something with a negative ring to it you can use scorned a. Contempt or disdain felt toward a person or object considered despicable or unworthy: viewed his rivals with scorn.
b.
The expression of such an attitude in behavior or speech; derision: heaped scorn upon his rivals. c.
The state of being despised or dishonored: held in scorn by his rivals.
Archaic
One spoken of or treated with contempt.
tr.v.
scorned, scorn·ing, scorns To consider or treat as contemptible or unworthy: an artist who was scorned by conservative critics.
To reject or refuse with derision: scorned their offer of help.
See Synonyms at despise.
To consider or reject (doing something)
as beneath one's dignity
ell.stackexchange.com/users/13710/Klas Lindbäck
Disliked. From Cambridge: Dislike ( noun ) a feeling of not liking something or someone.
ell.stackexchange.com/users/55051/Thirdymatic
Actually, outcast is a pretty good word to use here.
The usage would be like so: My friend is always wanted, while I'm always the outcast.
or as others have noted, if you're not actively cast out of groups but rather just not noticed: My friend is always wanted, while I'm always overlooked.
My friend is always wanted, while I go unnoticed.
ell.stackexchange.com/users/47717/John Hamilton
Undesireable Either in the adjective form: having qualities that are not pleasing or wanted an undesirable effect or the noun form one that is undesirable
Seem to fit here.
ell.stackexchange.com/users/38001/JimmyJames
Repulsive would fit in case where you describe a person you don't want to work with, but with a more emotional (they behave badly, smell/look unpleasantly), rather than objective (if they are a low productivity worker) sense.
ell.stackexchange.com/users/2558/user1306322
I feel like out of place would fit here.
Out of place :
[...] Fig.
[of someone ] awkward and unwelcome.
(*Typically: be ~; feel ~; seem ~.)
I feel out of place at formal dances.
Bob and Ann felt out of place at the picnic, so they went home.
My friend is always wanted while (I am always/
I always feel) out of place.
ell.stackexchange.com/users/49545/Toivo Säwén
I like Anathema, myself.
As in, "Gideon was anathema at the office."
It has the connotation of someone who is avoided, shunned, and held in low regard.
Anathema, in common usage, is something or someone that is detested or shunned.
In its other main usage, it is a formal excommunication.
The latter meaning, its ecclesiastical sense, is based on New Testament usage.
Wikipedia
ell.stackexchange.com/users/55149/Chris Berger
When a person is  wanted  everybody wants to work with him, he's popular and is always asked for. But is there an opposite for  wanted , meaning a person who isn't popular at work, someone whom nobody wants to work with.  I was thinking of the word  outcast  but I doubt it can refer to such a meaning considering its definition.  I would like to fit it into this context:   My friend is always wanted while I am always [this word].
The opposite of "wanted"
ell.stackexchange.com
<word-request>
ell.stackexchange.com/questions/128950
ell.stackexchange.com/users/44134/SovereignSun
Suggestions include disliked, outcast, undesirable or repulsive. Disliked, outcast, repulsive, undesireable, repulsive would fit too.
Disliked form dislike = a feeling of not liking something or someone. Outcast is a pretty good word to use here. Repulsive would fit in case where you describe a person you don't want to work with. Undesireable: either in the adjective form:  having qualities that are not pleasing or wanted an undesirable effect. Repulsive would fit too.