Emotion detection from text
There are certain pre-trained models available regarding sentiment analysis or emotion analysis like textblob , flair and deepmoji. Here the link to the in the medium -> 
https://medium.com/@b.terryjack/nlp-pre-trained-sentiment-analysis-1eb52a9d742c

But if you have your own set of emotions for which you want to classify, then the best way would be to gather data with labels (the emotions) and train a model from scratch.