Human emotion recognition plays a vital role in brain-to-brain communication, human-machine interactions and affective computing interfaces. This paper presents electroencephalogram (EEG) based emotion recognition using variational mode decomposition (VMD) and convolutional neural network (CNN) by finding optimal hyperparameters for recognizing three emotional classes: positive, neutral and negative. The two-stage VMD based EEG processing is proposed for effectively removing artifacts and noises from the EEG signal and also for decomposing EEG signal into five brain waves such as delta, theta, alpha,beta and gamma. The CNN based emotion recognition is presented based on the differential entropy feature extracted from 1 second brain waves instead of using brain waves directly in order to reduce size of CNN model. In this study, we created twelve CNN models using three number of layers (2, 5, and 7) and four activation functions with major objective of finding best CNN model(s). The standard SEED database is used to obtain trained CNN models and test their performance. Evaluation results show that the CNN architecture with rectified linear unit (ReLU) yielded higher accuracy of 90.33% among four activation functions. For predicting emotions of positive, negative and neutral, the CNN model with 2-layer and ReLU achieves an accuracy of 100%, 94.44% and 78.2%, respectively whereas the CNN model with 7-layer results in accuracy of 100%, 94.40% and 89.13%, respectively. This study also demonstrates significance of selecting optimal hyperparameters and best activation function.