There is a power iteration method, but it only returns the greatest(in absolute value) eigenvalue of matrix. So when we have negative eigenvalues it'll give wrong results. Is there any method, which work also for non-positive define matrices.

Find your greatest in absolute value eigenvalue, call it $E.$ If it is positive, the matrix $M + 2 EI$ is positive definite, so do whatever you do for positive definite matrices. If it is negative, $M - 2 E I$ is positive definite.