Gamma detectors consisting of lanthanum bromide (LaBr3) scintillator and silicon photomultiplier (SiPM) have extensive applications in various scientific fields. Accurate gamma energy measurement depends on accurate calibration of these detectors. While some studies have attempted detector self-calibration based on the natural background of LaBr3, these methods are limited to specific LaBr3 crystals and lack generality. To address this limitation, this paper proposes a self-calibration method that solely utilizes the natural radioactivity of 138La. By solving for the maximum similarity between the test background from measurement and the standard spectrum obtained from the Geant4 simulation, the detector is effectively calibrated. Furthermore, the application of a series of energy spectrum processing algorithms simplifies the solution complexity of the maximum similarity problem. Experimental results from four different crystals at varying temperatures demonstrate calibration errors of less than 0.8% at 662 keV, highlighting the method's broad applicability and accuracy. Besides, the influence of the background measurement time and the natural environmental background on the self-calibration method are discussed in detail, further illustrating the value of the application.