This study presents the H2 optimal control of negative stiffness and inerter-based dampers as supplemental dampers to a damped single degree of freedom system (SDOF). In total, five different negative stiffness and inerter combinations have been studied, viz., a negative stiffness damper (NSD), three negative stiffness inerter dampers (NSIDs) and a tuned inerter damper (TID). NSIDs are novel energy dissipation devices consisting of negative stiffness dampers (NSD) and inerter mechanisms. H2 optimal control minimises the root mean square (RMS) of structural response under random/stochastic excitations. The ground acceleration excitation is modelled as a stationary random white noise process. The equations of motion for the SDOF system with different supplemental dampers are written in a state space form, and corresponding closed-form expressions for the optimal parameters are arrived at. The closed-form expressions for NSD, NSIDs and TID are arrived at by a two-stage process: First, by using the numerical search technique for calculating the minima of the H2 norm. Second, using the results of the corresponding numerical search, a sequence of fitting curve schemes is employed to arrive at various closed-form expressions. The closed-form expressions are more straightforward to use. Finally, the comparative seismic performance of the base-isolated (BI) structure with the proposed optimal dampers is obtained under the set near fault (NF) and far-field (FF) ground motions. The time history analysis shows that the H2 optimal control is very efficient in response control of the base-isolated structures. In particular, optimally designed NSIDs outperform the NSD and TID as a control device to a base-isolated structure. Hence, the performance of both NSD and TID as the supplemental damper is enhanced by adding the inerter mechanism.