Relationship between absolute magnitude of a star and its luminosity? Why does this relationship involves the absolute magnitude of the sun and its luminosity?
How to derive an expression relating the absolute magnitude of a star to its luminosity?


So according to the magnitude equation, $$m - M = 2.5\log\left(\frac{d^2}{d_0^2}\right)$$ 
$$\Rightarrow M = m - 2.5\log\left(\frac{d^2}{d_0^2}\right)\ \ (eq1)$$

and Luminosity is $$L = 4\pi(d^2) \times f$$
 $$\Rightarrow d^2 = \frac{L}{4\pi \times f}\ \ (eq2)$$

Plugging eq2 to eq1 would have seem reasonable, but how is absolute magnitude of the sun and its luminosity used?
You are specifically talking about absolute visual magnitude; how bright an object would appear to our eyes if the object were 10 parsecs away from us. However, you must remember that stars emit a wide spectrum of light — much of it isn't visible to the naked eye.

Luminosity is a measure of the total amount of energy given off by a star (usually as light) in a certain amount of time. Thus, luminosity includes both visible light and invisible light emitted by a star. So there isn't a precise conversion between luminosity and absolute visual magnitude, although there is an approximation we can do.

Absolute bolometric magnitude is an analogous magnitude system considering all the energy emitted by the star. The formula relating absolute bolometric magnitude with luminosity is as follows:
$$L_\text{star} = L_0 10^{-0.4 M_\text{Bol}}$$

where $L_\text{star}$ is the star's luminosity, $M_{\text{Bol}}$ is the bolometric magnitude of the star, and $L_{0}$ is the zero-point luminosity (the luminosity of a star with $M_{\text{Bol}} = 0$) arbitrarily defined as $L_{0}=3.0128×10^{28}$ watts by the IAU. We can approximately convert between the two magnitudes via a bolometric correction:
$$M_{\text{bol}}\approx M_V + BC$$
The bolometric correction term $BC$ is empirically determined for the spectral class and evolutionary stage (although it can be modeled; see Torres (2010)). A table of values is given on the Wikipedia page.

The idea is that stars of the same spectral class and evolutionary stage have a similar distribution of wavelengths, so the discrepancy between all emitted wavelengths ($M_{\text{bol}}$) and visible wavelengths ($M_V$) should be similar.

Thus, the conversion between luminosity and absolute visual magnitude is approximately
$$L_\text{star} \approx L_0 10^{-0.4 (M_V + BC)}$$
Of course, this is only an approximation, but it can give us a pretty decent idea of what to expect. Trying it on 9 Pegasi, I predicted it would be around $1000 L_\odot$, which is still in the ballpark of the actual value $1950 L_\odot$. Mind you, the approximation would be better suited for less extreme stars than 9 Pegasi.