The average of any quantity $s$ is $\frac{\sum\limits_{r=0}^ns_r}{n}$. If the distribution is continuous, lets say as a function of x, then it becomes $\lim\limits_{n\to\infty}\frac{\sum\limits_{r=0}^ns_r}{n}$. This can be rewritten as $\frac{\int s(x)dx}{\int dx}$, taking limits as the length of the wire. In your formula, I don't see any $x$ term in the RHS, nor anything that could depend on x, so I don't see how we can proceed. Please specify what is constant and what is a function of x.
So the final formula is $$\frac{\int T(x)dx}{\int dx}$$
If your wire is infinite, you may need to take limits 0 to y, and then limit the expression for average as $y\to\infty$.
Update: with the updated formula, assuming the wire spans from x=0 to x=L,
$$\langle T\rangle=T_\infty- \frac{\dot{q}}{km^2}\left(\frac{\tanh(mL)}{mL}-1\right)$$
If the wire spans from 0 to y,
$$\langle T\rangle=T_\infty- \frac{\dot{q}}{km^2}\left(\frac{\sinh(my)}{my\cosh(my)}-1\right)$$.
Limiting y to infinity gives us an infinite answer. So I'm assuming that I've interpreted it correctly in my previous answer.