This paper presents a tetherless and miniaturized closed-loop optogenetic brain stimulation device, designed as a back mountable device for laboratory mice. The device has the ability to sense the biomarkers corresponding to major depressive disorder (MDD) from local field potential (LFP), and produces a feedback signal to control the closed-loop operation after on-device processing of the sensed signals. MDD is a chronic neurological disorder and there are still many unanswered questions about the underlying neurological mechanisms behind its occurrence. Along with other brain stimulation paradigms, optogenetics has recently proved effective in the study of MDD. Most of these experiments have used tethered and connected devices. However, the use of tethered devices in optogenetic brain stimulation experiments has the drawback of hindering the free movement of the laboratory animal subjects undergoing stimulation. To address this issue, the proposed device is small, light-weight, untethered, and back-mountable. The device consists of: (i) an optrode which houses an electrode for collecting neural signals, an optical source for delivering light stimulations, and a temperature sensor for monitoring the temperature increase at the stimulation site, (ii) a neural sensor for acquisition and pre-processing of the neural signals to obtain LFP signals in the frequency range of 4 to 200 Hz, as electrophysiological biomarkers of MDD (iii) a classifier for classification of the signal into four classes: normal, abnormal alpha, abnormal theta, and abnormal gamma oscillations, (iv) a control algorithm to select stimulation parameters based on the input class, and (v) a stimulator for generating light stimulations. The design, implementation, and evaluation of the device are presented, and the results are discussed. The neural sensor and the stimulator are circular in shape with a radius of 8 mm. Pre-recorded neural signals from the mouse hippocampus are used for the evaluation of the device.