I agree with bizziboi, you can use Box2d (aka "love.physics") to get similar results to what you want but it probably won't look exactly as you expect.
(The object rotate when falls from a corner)
Yep, that should work well with Box2d.
It will occur when the center of mass of the box goes past the corner of the platform.
Also, the rate at which it rotates will depend on the velocity of the box.
In an old-school platformer you could just play an animation of the character falling.
(The object go up on the platform, even if it's a rotated rectangle)
That will work too but you may have trouble with the corners of "slopes".
In particular, a box will not just slide up corners of slopes, but will usually roll or get stuck as it hits the corner.
(The object is jumping and is able to slide when touch the ceil)
This one will be tricky for Box2D.
Even if you use a circle or an octagon as in your illustration it won't look right.
Primarily because the object will be redirected sideways as it hits the corner.
Jumping is like
launching a projectile - imagine throwing a ball at the edge of the ceiling.
It will also lose vertical velocity as it hits the corner, especially if it has friction.
So yes, it can work but it won't "feel" the same like in classic platformers such as Super Mario Bros.
Generally there is a tradeoff between an accurate physics simulation and tight controls.