Please edit your posting and include the code in code tags </>.
I still don't know how your pot works. When it jumps back to zero after some time, I don't see how you handle that case. Your code also contains a lot of variables, which are used but don't change during the computation.
Can you tell which angle corresponds to the analogRead() range of 0-1024?
IMO you should read the pot as fast as possible, correct an eventual wraparound, and sum up the total traversed angle. Then use millis() to implement a sample frequency, e.g. 1Hz, and divide the traversed angle by that time to get the velocity. Reset the traversed angle for the next sample and continue summing up the traversed angle.