When I read in the literature about dielectric constant, I found two relations, as mentioned in the figure. So, I want to know the difference between these two formulas.
These relations are about two different aspects of the dielectric constants. (2) shows how two real parameters, phase shift and attenuation (or refractive index and absorption) can be combined into a single complex parameter, e.g. in one of the Maxwell equations, connecting H and B. And (1) is about calculations of the dielectric constant at some frequency, related to Kramers-Kronig relations. And Kramers-Kronig integral relations, in turn, follow from representing the H and B connection as an analytical function of a complex variable.
Hope, this description helps to see a general picture of the two formulas.
Formula (2) is the general form of complex dielectric function (DF) including a real (epsilon_1) and an imaginary part (epsilon_2). As Vladimir mentionned the two parts are related to each other by KK relation and the complex DF is the one that appears in Maxwell equations.
DF is strongly depending on frequency domain of electromagnetic field that interacts with the material.
I think formula (1) comes from IR spectroscopy convention.
The subscript r (epsilon_r) in (1) can be confusing as sometimes it means real and sometimes relative. This relative epsilon is the one that is commonly used and tabulated.
I recommend you banish the name constant because DF is far from being constant.
Finally the exact name for all these epsilons is permittivity.
To supplement Vladimir' and Michel' replies I am adding a plot to illustrate Formula (1) with a few contributions into the dielectric function (in that case, the refractive index) of some hypothetical material (taken from Fox M., Optical Properties of Solids (Oxford University Press, Oxford, New York, 2001), p. 36). The whole behavior of the dielectric function is described by Formula (2), of course, which for the complex index of refraction would be transformed into N = n - ik, where n is the refractive index and k is the extinction coefficient.