In the paper we generalize the theory of classical approximation spaces to a much wider class of spaces which are defined with the help of best approximation errors. We also give some applications. For example, we show that generalized approximation spaces can bei used to find natural (in some sense) domains of definition of unbounded operators.