I believe you're just confused about the meaning of the constant of integration. The constant of integration is not really a constant - it satisfies weird identities like c+1=c. The indefinite integral of

is an infinite
class of functions whose derivatives are all

. It's not really a function of

itself. When you say
∫tanx dx -∫tanx dx=-1
this is not actually meaningless - what it means is that the difference of two functions whose derivative is

is a constant function. The left-hand side is not really zero, it's an infinite class of functions - in this case, the class of functions with zero derivative, i.e. the class of constant functions. If you had
∫tanx dx -∫tanx dx = x
then you'd be in trouble, because the left-hand side has zero derivative, and the right-hand side has a derivative of 1. But
∫tanx dx -∫tanx dx=-1
is not a contradiction.
To look at it in another way, think of the indefinite integral

; in fact

is the class of constant functions.