How should one understand the "indefinite integral" notation $\int f(x)\;dx$ in calculus? In calculus, it is said that
$$
\int f(x)\; dx=F(x)\quad\text{means}\quad  F'(x)=f(x)\tag{1}
$$
where $F$ is a differentiable function on some open integral $I$. But the mean value theorem implies that any differentiable function $G:I\to \mathbb{R}$ with the property $G'(x)=f(x)$ on $I$ can be determined only up to a constant. Since the object on the right of the first equality of (1) is not unique, we cannot use (1) as a definition for the symbol $\int f(x)\;dx$.
Formulas for antiderivatives are usually written in the form of $\displaystyle \int f(x)\;dx=F(x)+C$. For example,
$$
\int \cos x\;dx = \sin x+C\;\tag{2}
$$
where $C$ is some "arbitrary" constant.
One cannot define an object with an "arbitrary" constant. It is OK to think about (2) as a set identity:
$$
\int \cos x\; dx = \{g:\mathbb{R}\to\mathbb{R}\mid g(x)=\sin x+C,\; C\in\mathbb{R}\}. \tag{3}
$$
So sometimes, people say that $\int f(x)\;dx$ really means a family of functions. But interpreting it this way, one runs into trouble of writing something like
$$
\int (2x+\cos x) \; dx = \int 2x\;dx+\int \cos x\; dx = \{x^2+\sin x+C:C\in\mathbb{R}\}\;\tag{4}
$$
where one is basically doing the addition of two sets in the middle, which is not defined.
So how should one understand the "indefinite integral" notation $\int f(x)\;dx$? In particular, what kind of mathematical objects is that?

I think the problem is not only for antiderivative, but more generally it has to cope with the abuse of notation for multivalued functions.
Take for instance the complex logarithm $\ln(z)=\overbrace{\ln(r)+i\theta}^{\operatorname{Ln}(z)}+i2k\pi$.
You have to understand $$\ln(z_1z_2)\color{red}=\ln(z_1)+\ln(z_2)$$
As $$\exists (k_1,k_2,k_3)\in\mathbb Z^3\mid \operatorname{Ln}(z_1z_2)+i2k_3\pi=\operatorname{Ln}(z_1)+i2k_1\pi+\operatorname{Ln}(z_2)+i2k_2\pi$$
In the same way, the expression $$\int (f+g)\color{red}=\int f+\int g$$
Should be seen as
$$\exists (C_1,C_2,C_3)\in\mathbb R^3\mid H(x)+C_3=F(x)+C_1+G(x)+C_2$$
In all these instances, you can simply regroup all the constant terms on RHS and write:
$$\int (f+g)\color{red}=F(x)+G(x)+C$$
This is the red equal sign $\color{red}=$ which is overloaded from the normal equal sign $=$, we give it extra properties (equality modulo a constant) when the context concerns multivalued functions, that's all.
