If we are given a limit : $$\lim_{x \to 0}\frac{g(x)-g(0)}{x}$$ where $g(x)$ is discontinuous at $0$ but the limit exists; i.e., $g(0)\neq g(0^{-})=g(0^{+})$. For example, the piecewise function g(x)=$\frac{x^3}{x}$ when $x\neq0$, and $g(x)=2$ when $x=0$. How do we evaluate it (or its left hand and right hand limits if it doesn't exist) rigorously in general (without substituting the expression for the function)?
Background and Detail
I was taught in school to directly substitute the value the variable is tending to in the limit expression to evaluate it. If we use the same approach (substituting the value of the variable In the expression) to the above given limit then we may get the wrong answer since the limit value is not the same as the functional value. Thus, the idea of substituting the variable value in the limit is not perfect (it is not a uniform approach), since it is not applicable to all cases (it should be atleast applicable to all non-indeterminate form containing limits, since there are other laws for solving limits with an indeterminate form and combining the two we can create an overall uniform approach). In attempt to create (More precisely "find" since such an approach probably already exists) a uniform approach to solving limits without an indeterminate form (to complete the uniform approach to solving limits), I started with testing whether using the limit laws suffices. I found that it failed when solving limits of the above type. So in a broader sense, my question is: "Is there a uniform approach to solving limits which do not involve an indeterminate form.
My Approach
My first approach was to apply the limit law of quotients : $$\lim_{x\to c}\frac{f(x)}{h(x)}=\frac{\lim_{x\to c}f(x)}{\lim_{x\to c}h(x)}$$ to the limit, taking f(x)=g(x)-g(0) and h(x)=x but the lower limit is 0 so we cannot do so. Then I thought of using the limit law of products : $$\lim_{x\to c}[f(x)h(x)]=\lim_{x\to c}f(x)\lim_{x\to c}h(x)$$ taking f(x)=g(x)-g(0) and h(x)=1/x. Using this I couldn't conclude anything because the limit of h(x) doesn't exist which means that the equality does not hold since the limit laws do not hold.
Any help would be greatly appreciated !