Systems, methods and devices are provided for assessing and/or treating pain, discomfort, and/or anxiety through the development of an algorithm based on a correlation between electroencephalography (EEG) signals received from a patient and the patient's self-assessed levels of pain. The pain detection algorithm is then applied to EEG signals obtained from any patient and used to assess the patient's level of pain without requiring other input from the patient. One or more devices in a system may be implemented to measure the EEG signals, apply the algorithm and display a level of pain in real-time to a patient or healthcare provider. The real-time pain assessment may be used to continuously monitor whether a patient is in pain and select one or more treatments to minimize the patient's perception of pain and avoid prescribing unnecessary medications.