Let $a\le 0\le b $ and let $ \gamma : \left[ a,b \right] \to \mathbb{R}$ be defined by $\gamma(t)= t\text{sin}\frac{1}{t}$ for $ t\neq 0 $ and $\gamma(t)=0$ for $t=0$. I want to investigate that if this function is rectifiable or not.
I know that for paths or smooth curves being rectifiable is guaranteed. So, since $\gamma'(t) = \sin \frac{1}{t} - \frac{1}{t} \cos \frac{1}{t}$ for $ t\neq 0 $, $\gamma'$ is continuous and bounded for $ t\neq 0 $, hence a smooth curve and hence rectifiable.
However, I highly doubt that this line of thinking is correct because the function is piecewisely defined, which is my main problem when attacking the problem. I know that there are two equivalent definitions for being rectifiable, one with the sup and the other is a convergence of the net of lengths of polygonal paths. However, I could not find a way to proceed from either definition.

The curve $t \mapsto t \sin \frac 1 t$ is not rectifiable.
First, a curve $\gamma : [a,b] \to \mathbb{R}$ is said rectifiable when the sums of the form $\sum_{i=1}^n |\gamma(t_i)-\gamma(t_{i-1})|$ where $a \leq t_0 < \dotsc < t_n \leq b$ are bounded above by a finite constant (independent of $n$).
Heuristically, a good indicator of whether a curve is rectifiable is that $\int_a^b |\gamma'(t)| \mathrm{d}t$ is finite. Here, this is not the case. As you computed, $\gamma'(t)$ contains a factor of the form $\frac 1 t \cos t$, which is not integrable near $0$ (unlike you mention, it is not bounded for $t \neq 0$; and the problem is thus not so much about the piecewise nature of the definition, but more about the competition between oscillation speed and amplitude).
Hence, we now want to disprove that the finite sums are uniformly bounded above. As sketched in @salcio's comment, after plotting the graph, we get the idea to use points $t_i$ such that $\sin \frac{1}{t_i} = +1$ and $\sin \frac{1}{t_{i-1}} = -1$, so located at opposite sides of the oscillations, to maximize the arc length.
More precisely, for any $p \geq 1$, we define $$ \begin{align} t_{2p} & = - \left(2 p \pi - \frac \pi 2\right)^{-1}, \\ t_{2p+1} & = - \left(2 p \pi + \frac \pi 2\right)^{-1}. \end{align} $$ This defines an increasing sequence of points, which satisfies $a < t_i < 0$ for $i \geq p_0$ large enough. Hence, we can consider a partition of the form $a < t_{2p_0} < t_{2p_0+1} < \dotsb < t_{2p_1} < t_{2p_1+1} < b$. Then $$ \sum_{i=2p_0+1}^{2p_1+1} |\gamma(t_i)-\gamma(t_{i-1})| \geq \sum_{p = p_0}^{p_1} |\gamma(t_{2p+1})-\gamma(t_{2p})| = \sum_{p = p_0}^{p_1} |t_{2p+1}+t_{2p}| \geq \sum_{p=p_0}^{p_1} \frac{2}{p \pi}. $$ Since the sum $\sum_{p = p_0}^{\infty} \frac 1 p$ diverges, we can make these arc lengths arbitrarily large by choosing $p_1$ large enough. This disproves the existence of an arc length of $\gamma$.