Yes, you need to specify in your prompt that Chat-GPT should answer only by returning one of the options you have mentioned.
I would style the prompt something like this:
emotions = ["happiness", "sadness", "anger", "fear", "trust", "curiosity", "hope", "despair"]
prompt = f"""What feeling, out of list: {emotions}, is filled in the following text? Please give only the name of the feeling as defined in the list, as output.\nText: {text}\nFeeling:"""
If you return the reply
from the function you can easily organise build an array with the replies you get for each time you call the function.
Hope it helps!