Comparator loses voltage when connected to mosfet
Add hysteresis to comparator level to stop oscillation


Some of the comments have correctly identified the need for hysteresis in your circuit because the battery terminal voltage will increase when you turn off Q1.
First, what you got right in your design:


A comparator is the correct choice for the task (not an opamp). The LM393 is quite appropriate.
You implemented a good stable voltage reference using the TL341L


One potentially easy way to implement the hysteresis is to place it in series with your voltage sensing input.
Under normal discharge operation you want the switching point to be accurately 3.8V, so you want to implement asymmetrical hysteresis. As the battery terminal voltage moves below the 3.8V threshold and Q1 turns off you want to reduce the sensed voltage by whatever hysteresis you want. 

The circuit would then look like this:







simulate this circuit &ndash; Schematic created using CircuitLab

With R3 and R4 as shown you will have about 100mV hysteresis. The discharger may still turn on and off several times as the battery voltage recovers, but eventually the terminal voltage will closely approach the 3.8V reference. R3 could be made an adjustable resistor if you wanted.