I'll be using mostly minus signature here. If you are using mostly plus, just adapt the functions accordingly. First, $\frac{1}{k^2(k-q)^2}$ is not a function of $q^2$ only, it is really a function of the whole four-vector $q$ (because of the mixed term $k_\mu q^\mu$).
If you don't really need to use complex tensor structures in your computations, you don't need to learn a new package for now (it would be useful for the future though), you can just define the Minkowskian product by yourself as
MinkProd[q1_List, q2_List] := 2 q1[[1]] q2[[1]] - q1.q2;
Now you can define kvec = {k[0], k[1], k[2], k[3]};
, then the function you want to take the derivative of is
F[q_List] := 1/(MinkProd[kvec, kvec] MinkProd[kvec - q, kvec - q]);
If qvec={q[0], q[1], q[2], q[3]};
, the derivative $\partial_{q^i}$ is just D[F[qvec],q[i]]
, then the result you want in terms of its components is just
qvec.Table[D[F[qvec], q[i]], {i, 0, 3}]/(2 MinkProd[qvec, qvec])
Notice that the scalar product in the expression above is just the dot product between the two lists since the Table gives you a covariant vector as output. MinkProd should only be used with two covariant or two contravariant vectors.
A little extra: if you want to convert a contravariant list into covariant or vice-versa, use
ConvertIndex[q_List] := Flatten@{q[[1]], Table[-q[[i]], {i, 2, Length[q]}]}
F(q^2)
isF
times the (Algebra I) square ofq
(usesPower[]
, notDot[]
). $\endgroup$