Rotating game object

Hi, Im using transform.Rotate() to rotate my game object while touching the screen. When I rotate it in X axis, I want it to rotate Y as if X was 0
sorry its really hard to explain.
Im trying to freeze its original pivot, and keep rotating gameObject around original pivot

Ok if anyone gets such issue with rotating character and camera I gave it a simple fix which might be helpful for you. So I was trying to rotate my player object by swiping up-down-right-left and the result was bad cause after rotating character up its transform.forward was facing the air. Instead I made left and right swipes rotate player, and up and down swipes rotate camera up and down, which is a child of player.
This fixed my issue and now it all works great