I can't say whether it's an abscess or an ulcer, but it definitely needs veterinary treatment. Anything that close to the eye is a big red flag for me. Please get him to the vet ASAP.
I agree please get your kitty to a vet ASAP. Whatever that is it is too close to your cat's eye. I am not a vet but to me that looks like the start of a possible abscess and it will be easier on your cat to get it treated quickly while it is still small. One of my cat's had something like that on his belly and the vet had to drain it put him on antibiotics for the infection. It was tiny like the one in your picture and I thought it was acne until it doubled in size over night.
I'm 99% sure that is an abscess - it will need vet treatment or it will get worse/larger quickly! They can drain it out and give antibiotics. Left alone, it can cause a really bad infection (I just recently dealt with helping a stray kitten with a back abscess - the vet said if nobody had helped him, the infection could turn lethal)